On Tue, Apr 26, 2011 at 09:13:08PM +0500, Mark Lumsden wrote: > Make a "Private" function private and other things. ok? > > -mark > > > Index: apply.c > =================================================================== > RCS file: /cvs/src/usr.bin/apply/apply.c,v > retrieving revision 1.24 > diff -u -p -r1.24 apply.c > --- apply.c 27 Oct 2009 23:59:35 -0000 1.24 > +++ apply.c 26 Apr 2011 09:40:48 -0000 > @@ -44,8 +44,8 @@ > #include <string.h> > #include <unistd.h> > > -void usage(void); > -int mysystem(const char *); > +static void usage(void);
+__dead void usage(void); > +static int mysystem(const char *); Does this really matter in a signle .c application? > > int > main(int argc, char *argv[]) > @@ -179,8 +179,7 @@ main(int argc, char *argv[]) > /* Run the command. */ > if (debug) > (void)printf("%s\n", c); > - else > - if (mysystem(c)) > + else if (mysystem(c)) > rval = 1; > } > > @@ -191,14 +190,14 @@ main(int argc, char *argv[]) > } > > /* > - * system -- > + * mysystem -- > * Private version of system(3). Use the user's SHELL environment > * variable as the shell to execute. > */ > -int > +static int > mysystem(const char *command) > { > - static char *name, *shell; > + static const char *name, *shell; > pid_t pid; > int pstat; > sigset_t mask, omask; > @@ -235,7 +234,7 @@ mysystem(const char *command) > return(pid == -1 ? -1 : pstat); > } > > -void > +static void +__dead void > usage(void) > { > (void)fprintf(stderr, > --patrick