diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-10-22 17:38:32 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-10-22 17:38:32 +0000 |
| commit | f90e81f97bfd20354a70f5cccf98f7f19787f47e (patch) | |
| tree | ca7c0b5d7e270e3427c129702051b4a5cde940e3 | |
| parent | 97ae0fe84cdc7ff3c931ea3e21679fe117848bbb (diff) | |
Notes
| -rw-r--r-- | usr.bin/lastcomm/lastcomm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index 4beed143c977..595e80e8f5f6 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -55,7 +55,6 @@ static const char rcsid[] = #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <struct.h> #include <unistd.h> #include <utmp.h> #include "pathnames.h" @@ -171,15 +170,14 @@ main(argc, argv) ab.ac_comm[1] = '\0'; } else for (p = &ab.ac_comm[0]; - p < &ab.ac_comm[fldsiz(acct, ac_comm)] && *p; ++p) + p < &ab.ac_comm[AC_COMM_LEN] && *p; ++p) if (!isprint(*p)) *p = '?'; if (*argv && !requested(argv, &ab)) continue; (void)printf("%-*.*s %-7s %-*s %-*s ", - fldsiz(acct, ac_comm), - fldsiz(acct, ac_comm), ab.ac_comm, + AC_COMM_LEN, AC_COMM_LEN, ab.ac_comm, flagbits(ab.ac_flag), UT_NAMESIZE, user_from_uid(ab.ac_uid, 0), UT_LINESIZE, getdev(ab.ac_tty)); @@ -271,7 +269,7 @@ requested(argv, acp) return (1); if ((p = getdev(acp->ac_tty)) && !strcmp(p, *argv)) return (1); - if (!strncmp(acp->ac_comm, *argv, fldsiz(acct, ac_comm))) + if (!strncmp(acp->ac_comm, *argv, AC_COMM_LEN)) return (1); } while (*++argv); return (0); |
