X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Flibudev%2Ftest-libudev.c;fp=src%2Flibudev%2Ftest-libudev.c;h=839a6a1a742dada69ca3446ff6b277f414c8e804;hb=3d41b6b8e864abbf7b81c938532f42e97a900e22;hp=94d34b1ae2e552171577221b2b0fb260ad6a867b;hpb=909eb4c01de03a32c915a2267166501dca5b78f6;p=thirdparty%2Fsystemd.git diff --git a/src/libudev/test-libudev.c b/src/libudev/test-libudev.c index 94d34b1ae2e..839a6a1a742 100644 --- a/src/libudev/test-libudev.c +++ b/src/libudev/test-libudev.c @@ -91,7 +91,7 @@ static void print_device(struct udev_device *device) { } static void test_device(struct udev *udev, const char *syspath) { - _cleanup_(udev_device_unrefp) struct udev_device *device; + _cleanup_(udev_device_unrefp) struct udev_device *device = NULL; log_info("/* %s, device %s */", __func__, syspath); device = udev_device_new_from_syspath(udev, syspath); @@ -102,7 +102,7 @@ static void test_device(struct udev *udev, const char *syspath) { } static void test_device_parents(struct udev *udev, const char *syspath) { - _cleanup_(udev_device_unrefp) struct udev_device *device; + _cleanup_(udev_device_unrefp) struct udev_device *device = NULL; struct udev_device *device_parent; log_info("/* %s, device %s */", __func__, syspath); @@ -172,7 +172,7 @@ static int enumerate_print_list(struct udev_enumerate *enumerate) { static void test_monitor(struct udev *udev) { _cleanup_(udev_monitor_unrefp) struct udev_monitor *udev_monitor; - _cleanup_close_ int fd_ep; + _cleanup_close_ int fd_ep = -EBADF; int fd_udev; struct epoll_event ep_udev = { .events = EPOLLIN,