]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: fix shadow declaration
authorSami Kerola <kerolasa@iki.fi>
Sat, 3 Oct 2015 18:31:07 +0000 (19:31 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 9 Oct 2015 09:17:12 +0000 (11:17 +0200)
misc-utils/uuidd.c:384:13: warning: declaration of 'ret' shadows a previous
   local [-Wshadow]
misc-utils/uuidd.c:327:6: note: shadowed declaration is here

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/uuidd.c

index c897372d59cccad70f953f92c07c0b3309f0216e..2359f986fd8d7e8c82dd7db0c53abae0a6e4687a 100644 (file)
@@ -381,15 +381,15 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
 
 #ifdef HAVE_LIBSYSTEMD
        if (uuidd_cxt->no_sock) {
-               const int ret = sd_listen_fds(0);
+               const int r = sd_listen_fds(0);
 
-               if (ret < 0) {
-                       errno = ret * -1;
+               if (r < 0) {
+                       errno = r * -1;
                        err(EXIT_FAILURE, _("sd_listen_fds() failed"));
-               } else if (ret == 0)
+               } else if (r == 0)
                        errx(EXIT_FAILURE,
                             _("no file descriptors received, check systemctl status uuidd.socket"));
-               else if (1 < ret)
+               else if (1 < r)
                        errx(EXIT_FAILURE,
                             _("too many file descriptors received, check uuidd.socket"));
                s = SD_LISTEN_FDS_START + 0;