]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: move unreachable code to pre-processor #else segment [oclint]
authorSami Kerola <kerolasa@iki.fi>
Sun, 3 Jul 2016 19:10:11 +0000 (20:10 +0100)
committerSami Kerola <kerolasa@iki.fi>
Thu, 21 Jul 2016 20:14:33 +0000 (21:14 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
term-utils/agetty.c

index 07d82b9fb5d0b1a2ece99b89526f643e4cc62ca2..d5dc0182f711660f31fdc9d01b0b98a48d67a20e 100644 (file)
@@ -1424,7 +1424,7 @@ static char *xgetdomainname(void)
 {
 #ifdef HAVE_GETDOMAINNAME
        char *name;
-       size_t sz = get_hostname_max() + 1;
+       const size_t sz = get_hostname_max() + 1;
 
        name = malloc(sizeof(char) * sz);
        if (!name)
@@ -1436,8 +1436,9 @@ static char *xgetdomainname(void)
        }
        name[sz - 1] = '\0';
        return name;
-#endif
+#else
        return NULL;
+#endif
 }
 
 static char *read_os_release(struct options *op, const char *varname)