X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudev-builtin-btrfs.c;h=3643596a70220518ff2b026fcba7594dd8494bd7;hb=b44787bd437f4051660272b37bd6f75392f17931;hp=2e2112fd92344f67e907d88f8ea816f7a9ca7d07;hpb=7bed7f0e3b1f9596aedb64657e432e5b267adebb;p=elogind.git diff --git a/src/udev/udev-builtin-btrfs.c b/src/udev/udev-builtin-btrfs.c index 2e2112fd9..3643596a7 100644 --- a/src/udev/udev-builtin-btrfs.c +++ b/src/udev/udev-builtin-btrfs.c @@ -24,6 +24,7 @@ #include #include #include + #ifdef HAVE_LINUX_BTRFS_H #include #endif @@ -32,7 +33,7 @@ #include "udev.h" static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) { - struct btrfs_ioctl_vol_args args; + struct btrfs_ioctl_vol_args args = {}; _cleanup_close_ int fd = -1; int err; @@ -48,7 +49,7 @@ static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool t if (err < 0) return EXIT_FAILURE; - udev_builtin_add_property(dev, test, "ID_BTRFS_READY", err == 0 ? "1" : "0"); + udev_builtin_add_property(dev, test, "ID_BTRFS_READY", one_zero(err == 0)); return EXIT_SUCCESS; }