Add const keyword to pointers that point to strings which shouldn't be changed 
and remove blankline from usage().

ok?

-mark

Index: stat.c
===================================================================
RCS file: /cvs/src/usr.bin/stat/stat.c,v
retrieving revision 1.16
diff -u -p -r1.16 stat.c
--- stat.c      1 Sep 2010 06:35:05 -0000       1.16
+++ stat.c      1 Sep 2010 11:25:35 -0000
@@ -140,7 +140,7 @@ int format1(const struct stat *,    /* stat
            int, int, int, int,         /* the parsed format */
            int, int);
 
-char *timefmt;
+const char *timefmt;
 
 #define addchar(s, c, nl) \
        do { \
@@ -156,7 +156,7 @@ main(int argc, char *argv[])
        struct stat st;
        int ch, rc, errs;
        int lsF, fmtchar, usestat, fn, nonl, quiet;
-       char *statfmt, *options, *synopsis;
+       const char *statfmt, *options, *synopsis;
 
        lsF = 0;
        fmtchar = '\0';
@@ -281,7 +281,6 @@ main(int argc, char *argv[])
 void
 usage(const char *synopsis)
 {
-
        (void)fprintf(stderr, "usage: %s %s\n", __progname, synopsis);
        exit(1);
 }

Reply via email to