Date: Sun, 6 Nov 2011 08:15:42 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227168 - head/usr.bin/last Message-ID: <201111060815.pA68Fgxt008501@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Sun Nov 6 08:15:41 2011 New Revision: 227168 URL: http://svn.freebsd.org/changeset/base/227168 Log: Add missing static keywords to last(1) Modified: head/usr.bin/last/last.c Modified: head/usr.bin/last/last.c ============================================================================== --- head/usr.bin/last/last.c Sun Nov 6 08:15:35 2011 (r227167) +++ head/usr.bin/last/last.c Sun Nov 6 08:15:41 2011 (r227168) @@ -70,9 +70,9 @@ typedef struct arg { int type; /* type of arg */ struct arg *next; /* linked list pointer */ } ARG; -ARG *arglist; /* head of linked list */ +static ARG *arglist; /* head of linked list */ -LIST_HEAD(idlisthead, idtab) idlist; +static LIST_HEAD(idlisthead, idtab) idlist; struct idtab { time_t logout; /* log out time */ @@ -94,17 +94,17 @@ static time_t snaptime; /* if != 0, we * at this snapshot time */ -void addarg(int, char *); -time_t dateconv(char *); -void doentry(struct utmpx *); -void hostconv(char *); -void printentry(struct utmpx *, struct idtab *); -char *ttyconv(char *); -int want(struct utmpx *); -void usage(void); -void wtmp(void); +static void addarg(int, char *); +static time_t dateconv(char *); +static void doentry(struct utmpx *); +static void hostconv(char *); +static void printentry(struct utmpx *, struct idtab *); +static char *ttyconv(char *); +static int want(struct utmpx *); +static void usage(void); +static void wtmp(void); -void +static void usage(void) { (void)fprintf(stderr, @@ -196,7 +196,7 @@ main(int argc, char *argv[]) * wtmp -- * read through the wtmp file */ -void +static void wtmp(void) { struct utmpx *buf = NULL; @@ -237,7 +237,7 @@ wtmp(void) * doentry -- * process a single wtmp entry */ -void +static void doentry(struct utmpx *bp) { struct idtab *tt, *ttx; /* idlist entry */ @@ -313,7 +313,7 @@ doentry(struct utmpx *bp) * If `tt' is non-NULL, use it and `crmsg' to print the logout time or * logout type (crash/shutdown) as appropriate. */ -void +static void printentry(struct utmpx *bp, struct idtab *tt) { char ct[80]; @@ -378,7 +378,7 @@ printentry(struct utmpx *bp, struct idta * want -- * see if want this entry */ -int +static int want(struct utmpx *bp) { ARG *step; @@ -411,7 +411,7 @@ want(struct utmpx *bp) * addarg -- * add an entry to a linked list of arguments */ -void +static void addarg(int type, char *arg) { ARG *cur; @@ -430,7 +430,7 @@ addarg(int type, char *arg) * has a domain attached that is the same as the current domain, rip * off the domain suffix since that's what login(1) does. */ -void +static void hostconv(char *arg) { static int first = 1; @@ -453,7 +453,7 @@ hostconv(char *arg) * ttyconv -- * convert tty to correct name. */ -char * +static char * ttyconv(char *arg) { char *mval; @@ -485,7 +485,7 @@ ttyconv(char *arg) * [[CC]YY]MMDDhhmm[.SS]] to a time_t. * Derived from atime_arg1() in usr.bin/touch/touch.c */ -time_t +static time_t dateconv(char *arg) { time_t timet;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111060815.pA68Fgxt008501>