summaryrefslogtreecommitdiffstats
path: root/usr.bin/msgs
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-12-06 07:34:49 +0000
committerdg <dg@FreeBSD.org>1995-12-06 07:34:49 +0000
commita32045a9de967adcb942e7c3d4c121e79f140e01 (patch)
tree068f25e662bf5f1b9d116b2a174c4a0911d4b697 /usr.bin/msgs
parent699ff01f6608c66c7dd030106cfd033cd1661935 (diff)
downloadFreeBSD-src-a32045a9de967adcb942e7c3d4c121e79f140e01.zip
FreeBSD-src-a32045a9de967adcb942e7c3d4c121e79f140e01.tar.gz
Initialize some uninitialized variables to fix a bug that sometimes
resulted in msgs doing strange things, including getting stuck in an infinite loop.
Diffstat (limited to 'usr.bin/msgs')
-rw-r--r--usr.bin/msgs/msgs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c
index 6f2a3a4..be1b407 100644
--- a/usr.bin/msgs/msgs.c
+++ b/usr.bin/msgs/msgs.c
@@ -153,7 +153,7 @@ 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 = 0, lastmsg = 0;
int blast = 0;
FILE *bounds;
OpenPOWER on IntegriCloud