summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-queue-private.c
diff options
context:
space:
mode:
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;