diff options
author | araujo <araujo@FreeBSD.org> | 2015-07-28 02:32:40 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2015-07-28 02:32:40 +0000 |
commit | fafebceb9b4261b02d6bdbab4301b2c00ae3ddf7 (patch) | |
tree | 474a3116b16d6874dad78ef520947dc99f16dd88 /usr.sbin/yppush | |
parent | 63528763eb4bf746eee1fefdf2e6dbf302f7adea (diff) | |
download | FreeBSD-src-fafebceb9b4261b02d6bdbab4301b2c00ae3ddf7.zip FreeBSD-src-fafebceb9b4261b02d6bdbab4301b2c00ae3ddf7.tar.gz |
Staticfy and constify some variables and clean up the code a bit to make it
more readable. No functional change.
Differential Revision: D3166
Reviewed by: kib
Sponsored by: gandi.net
Diffstat (limited to 'usr.sbin/yppush')
-rw-r--r-- | usr.sbin/yppush/yppush_main.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/yppush/yppush_main.c b/usr.sbin/yppush/yppush_main.c index 6c66515..5a712e5 100644 --- a/usr.sbin/yppush/yppush_main.c +++ b/usr.sbin/yppush/yppush_main.c @@ -58,15 +58,15 @@ int debug = 1; int _rpcpmstart = 0; char *yp_dir = _PATH_YP; -char *yppush_mapname = NULL; /* Map to transfer. */ -char *yppush_domain = NULL; /* Domain in which map resides. */ -char *yppush_master = NULL; /* Master NIS server for said domain. */ -int skip_master = 0; /* Do not attempt to push map to master. */ -int verbose = 0; /* Toggle verbose mode. */ -unsigned long yppush_transid = 0; -int yppush_timeout = 80; /* Default timeout. */ -int yppush_jobs = 1; /* Number of allowed concurrent jobs. */ -int yppush_running_jobs = 0; /* Number of currently running jobs. */ +static char *yppush_mapname = NULL; /* Map to transfer. */ +static char *yppush_domain = NULL; /* Domain in which map resides. */ +static char *yppush_master = NULL; /* Master NIS server for said domain. */ +static int skip_master = 0; /* Do not attempt to push map to master. */ +static int verbose = 0; /* Toggle verbose mode. */ +static unsigned long yppush_transid = 0; +static int yppush_timeout = 80; /* Default timeout. */ +static int yppush_jobs = 1; /* Number of allowed concurrent jobs. */ +static int yppush_running_jobs = 0; /* Number of currently running jobs. */ /* Structure for holding information about a running job. */ struct jobs { @@ -80,8 +80,7 @@ struct jobs { struct jobs *next; }; -struct jobs *yppush_joblist; /* Linked list of running jobs. */ - +static struct jobs *yppush_joblist; /* Linked list of running jobs. */ static int yppush_svc_run(int); /* @@ -464,7 +463,8 @@ yppush_foreach(int status, char *key, int keylen, char *val, int vallen, return (0); } -static void usage() +static void +usage() { fprintf (stderr, "%s\n%s\n", "usage: yppush [-d domain] [-t timeout] [-j #parallel jobs] [-h host]", |