diff options
Diffstat (limited to 'usr.sbin/mount_portalfs/conf.c')
| -rw-r--r-- | usr.sbin/mount_portalfs/conf.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/usr.sbin/mount_portalfs/conf.c b/usr.sbin/mount_portalfs/conf.c index 5e0db79c970f..f6b34bd39f44 100644 --- a/usr.sbin/mount_portalfs/conf.c +++ b/usr.sbin/mount_portalfs/conf.c @@ -70,8 +70,7 @@ static path *curp; /* XXX for regerror */ * Add an element to a 2-way list, * just after (pred) */ -static void ins_que(elem, pred) -qelem *elem, *pred; +static void ins_que(qelem *elem, qelem *pred) { qelem *p = pred->q_forw; elem->q_back = pred; @@ -83,8 +82,7 @@ qelem *elem, *pred; /* * Remove an element from a 2-way list */ -static void rem_que(elem) -qelem *elem; +static void rem_que(qelem *elem) { qelem *p = elem->q_forw; qelem *p2 = elem->q_back; @@ -95,8 +93,7 @@ qelem *elem; /* * Error checking malloc */ -static void *xmalloc(siz) -unsigned siz; +static void *xmalloc(unsigned siz) { void *p = malloc(siz); if (p) @@ -112,9 +109,7 @@ unsigned siz; * not found then the path is added to the end of the list * and 1 is returned. */ -static int pinsert(p0, q0) -path *p0; -qelem *q0; +static int pinsert(path *p0, qelem *q0) { qelem *q; @@ -131,9 +126,7 @@ qelem *q0; } -static path *palloc(cline, lno) -char *cline; -int lno; +static path *palloc(char *cline, int lno) { int c; char *s; @@ -219,8 +212,7 @@ int lno; /* * Free a path structure */ -static void pfree(p) -path *p; +static void pfree(path *p) { free(p->p_args); if (p->p_rxvalid) { @@ -234,9 +226,7 @@ path *p; * Discard all currently held path structures on q0. * and add all the ones on xq. */ -static void preplace(q0, xq) -qelem *q0; -qelem *xq; +static void preplace(qelem *q0, qelem *xq) { /* * While the list is not empty, @@ -259,9 +249,7 @@ qelem *xq; * Read the lines from the configuration file and * add them to the list of paths. */ -static void readfp(q0, fp) -qelem *q0; -FILE *fp; +static void readfp(qelem *q0, FILE *fp) { char cline[LINE_MAX]; int nread = 0; @@ -296,9 +284,7 @@ FILE *fp; * the existing path list with the new version. * If the file is not readable, then no changes take place */ -void conf_read(q, conf) -qelem *q; -char *conf; +void conf_read(qelem *q, char *conf) { FILE *fp = fopen(conf, "r"); if (fp) { @@ -312,9 +298,7 @@ char *conf; } -char **conf_match(q0, key) -qelem *q0; -char *key; +char **conf_match(qelem *q0, char *key) { qelem *q; |
