]> err.no Git - systemd/commit
use more appropriate alternatives to malloc()
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Tue, 21 Oct 2008 10:10:32 +0000 (11:10 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 21 Oct 2008 10:54:57 +0000 (12:54 +0200)
commitb29a5e4ab98f460d2f79a11d1969858640e897e6
treea89a0b059e5b7c365648756ffc76467562030b71
parenta8a8930072c78013bfa4064067242e4826ef837a
use more appropriate alternatives to malloc()

Use calloc to request cleared memory instead.
Kernel and libc conspire to make this more efficient.

Also, replace one malloc() + strcpy() with strdup().

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
extras/collect/collect.c
extras/volume_id/lib/volume_id.c
udev/lib/libudev-ctrl.c
udev/lib/libudev-device.c
udev/lib/libudev-enumerate.c
udev/lib/libudev-monitor.c
udev/lib/libudev-queue.c
udev/lib/libudev.c
udev/udev-event.c
udev/udev-rules.c