From 9e0bd1d69b006ce4e463003ad38aef22da0c1ac3 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 22 Jan 2022 00:16:35 +0900 Subject: [PATCH] udevadm: split assertions Then we can easily find which pointer is NULL. --- src/udev/udevadm-info.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c index 3535517183a..a825f17c063 100644 --- a/src/udev/udevadm-info.c +++ b/src/udev/udevadm-info.c @@ -266,7 +266,8 @@ static void cleanup_dir(DIR *dir, mode_t mask, int depth) { static bool cleanup_dir_after_db_cleanup(DIR *dir, DIR *datadir) { unsigned int kept = 0; - assert(dir && datadir); + assert(dir); + assert(datadir); FOREACH_DIRENT_ALL(dent, dir, break) { struct stat data_stats, link_stats; @@ -291,8 +292,8 @@ static bool cleanup_dir_after_db_cleanup(DIR *dir, DIR *datadir) { } static void cleanup_dirs_after_db_cleanup(DIR *dir, DIR *datadir) { - - assert(dir && datadir); + assert(dir); + assert(datadir); FOREACH_DIRENT_ALL(dent, dir, break) { struct stat stats; -- 2.47.3