Date: Sat, 10 Dec 2011 18:35:26 +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: r228397 - head/libexec/comsat Message-ID: <201112101835.pBAIZQpc017318@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Sat Dec 10 18:35:26 2011 New Revision: 228397 URL: http://svn.freebsd.org/changeset/base/228397 Log: Make comsat(8) approximately 15% smaller. This program only consists of a single C file, so simply mark everything except main() static. Modified: head/libexec/comsat/comsat.c Modified: head/libexec/comsat/comsat.c ============================================================================== --- head/libexec/comsat/comsat.c Sat Dec 10 18:27:55 2011 (r228396) +++ head/libexec/comsat/comsat.c Sat Dec 10 18:35:26 2011 (r228397) @@ -68,17 +68,17 @@ static const char rcsid[] = #include <unistd.h> #include <utmpx.h> -int debug = 0; +static int debug = 0; #define dsyslog if (debug) syslog #define MAXIDLE 120 -char hostname[MAXHOSTNAMELEN]; +static char hostname[MAXHOSTNAMELEN]; -void jkfprintf(FILE *, char[], char[], off_t); -void mailfor(char *); -void notify(struct utmpx *, char[], off_t, int); -void reapchildren(int); +static void jkfprintf(FILE *, char[], char[], off_t); +static void mailfor(char *); +static void notify(struct utmpx *, char[], off_t, int); +static void reapchildren(int); int main(int argc __unused, char *argv[] __unused) @@ -115,13 +115,13 @@ main(int argc __unused, char *argv[] __u } } -void +static void reapchildren(int signo __unused) { while (wait3(NULL, WNOHANG, NULL) > 0); } -void +static void mailfor(char *name) { struct utmpx *utp; @@ -157,7 +157,7 @@ mailfor(char *name) static const char *cr; -void +static void notify(struct utmpx *utp, char file[], off_t offset, int folder) { FILE *tp; @@ -219,7 +219,7 @@ notify(struct utmpx *utp, char file[], o _exit(0); } -void +static void jkfprintf(FILE *tp, char user[], char file[], off_t offset) { unsigned char *cp, ch;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112101835.pBAIZQpc017318>