From: Sami Kerola Date: Sun, 3 Jul 2016 19:10:11 +0000 (+0100) Subject: agetty: move unreachable code to pre-processor #else segment [oclint] X-Git-Tag: v2.29-rc1~143^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58c756c92dc4795c9c7a72df7c30b5d6ff24a74a;p=thirdparty%2Futil-linux.git agetty: move unreachable code to pre-processor #else segment [oclint] Signed-off-by: Sami Kerola --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 07d82b9fb5..d5dc0182f7 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -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)