diff options
author | Sami Kerola | 2016-07-03 21:10:11 +0200 |
---|---|---|
committer | Sami Kerola | 2016-07-21 22:14:33 +0200 |
commit | 58c756c92dc4795c9c7a72df7c30b5d6ff24a74a (patch) | |
tree | 540549e4f2eeaebd074003da8970391fc097e4b5 /term-utils/agetty.c | |
parent | setterm: fix declarations shadowing variables in the global scope [oclint] (diff) | |
download | kernel-qcow2-util-linux-58c756c92dc4795c9c7a72df7c30b5d6ff24a74a.tar.gz kernel-qcow2-util-linux-58c756c92dc4795c9c7a72df7c30b5d6ff24a74a.tar.xz kernel-qcow2-util-linux-58c756c92dc4795c9c7a72df7c30b5d6ff24a74a.zip |
agetty: move unreachable code to pre-processor #else segment [oclint]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r-- | term-utils/agetty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 07d82b9fb..d5dc0182f 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) |