summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-queue-private.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-13 14:45:51 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-13 14:45:51 +0100
commit955d98c9c1104d469c2989dbfb58f58ee6fe9bdc (patch)
tree6964487e69bfefbbb08b0de140c67c6f2a00d791 /src/libudev/libudev-queue-private.c
parent7e2270246b0906675c8f34bc278b1608b969e65c (diff)
everywhere: make use of new0() and macro() macros, and stop using perror()
Diffstat (limited to 'src/libudev/libudev-queue-private.c')
-rw-r--r--src/libudev/libudev-queue-private.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libudev/libudev-queue-private.c b/src/libudev/libudev-queue-private.c
index 80d7ceef2b..d5a2b503dd 100644
--- a/src/libudev/libudev-queue-private.c
+++ b/src/libudev/libudev-queue-private.c
@@ -79,7 +79,7 @@ struct udev_queue_export *udev_queue_export_new(struct udev *udev)
if (udev == NULL)
return NULL;
- udev_queue_export = calloc(1, sizeof(struct udev_queue_export));
+ udev_queue_export = new0(struct udev_queue_export, 1);
if (udev_queue_export == NULL)
return NULL;
udev_queue_export->udev = udev;
@@ -162,7 +162,7 @@ static struct queue_devpaths *build_index(struct udev_queue_export *udev_queue_e
udev_err(udev_queue_export->udev, "queue file overflow\n");
return NULL;
}
- devpaths = calloc(1, sizeof(struct queue_devpaths) + (range + 1) * sizeof(long));
+ devpaths = malloc0(sizeof(struct queue_devpaths) + (range + 1) * sizeof(long));
if (devpaths == NULL)
return NULL;
devpaths->devpaths_size = range + 1;