From: Yu Watanabe Date: Fri, 21 Jan 2022 15:16:35 +0000 (+0900) Subject: udevadm: split assertions X-Git-Tag: v251-rc1~481^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e0bd1d69b006ce4e463003ad38aef22da0c1ac3;p=thirdparty%2Fsystemd.git udevadm: split assertions Then we can easily find which pointer is NULL. --- 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;