From: David Levine Date: Thu, 12 Feb 2015 03:38:51 +0000 (-0600) Subject: Replaced individual assignment of array elements, one of which was X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/c056299b41849297b388f4c11bcbdf4f89f9773e?ds=inline;hp=-c Replaced individual assignment of array elements, one of which was out of range, with array initialization. --- c056299b41849297b388f4c11bcbdf4f89f9773e diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 4b11494e..056c2f45 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -1355,12 +1355,10 @@ static void output_header(CT ct, struct format *fmt) { charstring_t outbuf = charstring_create (BUFSIZ); - int dat[5]; + int dat[5] = { 0 }; char *endp; int message = 0; - dat[0] = dat[1] = dat[2] = dat[3] = dat[4] = dat[5] = 0; - if (folder_comp) folder_comp->c_text = getcpy(folder); @@ -1392,9 +1390,7 @@ output_marker(CT ct, struct format *fmt, int hidden) int partsize; int message = 0; char *endp; - int dat[5]; - - dat[0] = dat[1] = dat[2] = dat[3] = dat[4] = dat[5] = 0; + int dat[5] = { 0 }; /* * Grab any items we care about.