From: Lennart Poettering Date: Mon, 4 Nov 2024 10:01:07 +0000 (+0100) Subject: sd-daemon: drop some redundant 'else' X-Git-Tag: v257-rc1~31^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bea2237f6709aa8c432356c61440873c879483e8;p=thirdparty%2Fsystemd.git sd-daemon: drop some redundant 'else' --- diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c index ae890b6d205..26e4257a1ff 100644 --- a/src/libsystemd/sd-daemon/sd-daemon.c +++ b/src/libsystemd/sd-daemon/sd-daemon.c @@ -180,10 +180,10 @@ _public_ int sd_is_special(int fd, const char *path) { if (S_ISREG(st_fd.st_mode) && S_ISREG(st_path.st_mode)) return stat_inode_same(&st_path, &st_fd); - else if (S_ISCHR(st_fd.st_mode) && S_ISCHR(st_path.st_mode)) + if (S_ISCHR(st_fd.st_mode) && S_ISCHR(st_path.st_mode)) return st_path.st_rdev == st_fd.st_rdev; - else - return 0; + + return 0; } return 1;