When messages are added to the /var/msgs/ directory via:

# msgs -s

The contents of the bounds file are incorrectly filled with a random number if 
the bounds file is initially empty (which it is on a newly installed system). 

This diff is one way to fix the problem. ok?

mark

Index: msgs.c
===================================================================
RCS file: /cvs/src/usr.bin/msgs/msgs.c,v
retrieving revision 1.34
diff -u -p -r1.34 msgs.c
--- msgs.c      27 Oct 2009 23:59:40 -0000      1.34
+++ msgs.c      22 Sep 2010 06:56:42 -0000
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
        bool newrc, already;
        int rcfirst = 0;                /* first message to print (from .rc) */
        int rcback = 0;                 /* amount to back off of rcfirst */
-       int firstmsg, nextmsg, lastmsg = 0;
+       int firstmsg = 0, nextmsg, lastmsg = 0;
        int blast = 0;
        FILE *bounds;
        char *cp;

Reply via email to