From 7fb21cfd3902c8f5069b93bb100a2a259de084d5 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 22 Oct 2000 17:38:32 +0000 Subject: Avoid using the semi-bogus include All uses of fldsiz() in this file were wrong anyway. --- usr.bin/lastcomm/lastcomm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'usr.bin/lastcomm/lastcomm.c') diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index 4beed14..595e80e 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -55,7 +55,6 @@ static const char rcsid[] = #include #include #include -#include #include #include #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); -- cgit v1.1