diff options
author | Sami Kerola | 2013-08-17 20:15:17 +0200 |
---|---|---|
committer | Karel Zak | 2013-08-23 10:59:02 +0200 |
commit | 328734c04860ded2750fbf0b85d2acb9d0a5e0c9 (patch) | |
tree | 4ba4fe9e77ac7820904468b5f06a0b84b0292049 /login-utils/last.c | |
parent | last: remove broken code (diff) | |
download | kernel-qcow2-util-linux-328734c04860ded2750fbf0b85d2acb9d0a5e0c9.tar.gz kernel-qcow2-util-linux-328734c04860ded2750fbf0b85d2acb9d0a5e0c9.tar.xz kernel-qcow2-util-linux-328734c04860ded2750fbf0b85d2acb9d0a5e0c9.zip |
last: use as narrow variable scoping as possible
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/last.c')
-rw-r--r-- | login-utils/last.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/login-utils/last.c b/login-utils/last.c index 63055a781..e94f1f038 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -259,7 +259,7 @@ static int list(struct utmp *p, time_t t, int what) char final[512]; char utline[UT_LINESIZE+1]; char domain[256]; - char *s, **walk; + char *s; int mins, hours, days; int r, len; @@ -277,6 +277,7 @@ static int list(struct utmp *p, time_t t, int what) * Is this something we wanna show? */ if (show) { + char **walk; for (walk = show; *walk; walk++) { if (strncmp(p->ut_name, *walk, UT_NAMESIZE) == 0 || strcmp(utline, *walk) == 0 || |