[patch usr.bin/pkill/pkill.c malloc memset = calloc

2014-05-06 Thread Peter Malone
Hi there, I thought I had sent in all of these, but this was in my drafts and I didn't see it after searching the list my sent items. ok? Index: pkill.c === RCS file: /cvs/src/usr.bin/pkill/pkill.c,v retrieving revision

Re: [patch usr.bin/pkill/pkill.c malloc memset = calloc

2014-05-06 Thread Ted Unangst
On Tue, May 06, 2014 at 21:20, Peter Malone wrote: */ - if ((selected = malloc(nproc)) == NULL) + if ((selected = calloc(1, nproc)) == NULL) errx(STATUS_ERROR, memory allocation failure); selected is an array of nproc chars, so I made it calloc(nproc, 1). really,