summaryrefslogtreecommitdiffstats
path: root/libexec/comsat
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-12-10 18:35:26 +0000
committered <ed@FreeBSD.org>2011-12-10 18:35:26 +0000
commit71c254bdb3ff5cc5a01a43eb10a5da8c112b64c0 (patch)
treebba8e94d2f7b0bed4d72fda5f6992cd5e73fc0f4 /libexec/comsat
parente886a142d57c040119eec38bb0a9eca53bc3aab4 (diff)
downloadFreeBSD-src-71c254bdb3ff5cc5a01a43eb10a5da8c112b64c0.zip
FreeBSD-src-71c254bdb3ff5cc5a01a43eb10a5da8c112b64c0.tar.gz
Make comsat(8) approximately 15% smaller.
This program only consists of a single C file, so simply mark everything except main() static.
Diffstat (limited to 'libexec/comsat')
-rw-r--r--libexec/comsat/comsat.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c
index 2a0fd3c..d15c2a4 100644
--- a/libexec/comsat/comsat.c
+++ b/libexec/comsat/comsat.c
@@ -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[] __unused)
}
}
-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[], off_t offset, int folder)
_exit(0);
}
-void
+static void
jkfprintf(FILE *tp, char user[], char file[], off_t offset)
{
unsigned char *cp, ch;
OpenPOWER on IntegriCloud