Re: [PATCH SET] malloc + memset => calloc

2014-05-25 Thread Ted Unangst
On Sun, May 25, 2014 at 08:34, Benjamin Baier wrote: > Hi tech@ > > I'm just geting into the OpenBSD source code, and what better way to > learn than with real "work"... > > Some malloc/memset to calloc changes. More to come if this kind of work > is appreciated. Yes, but can you split future

Re: [PATCH SET] malloc + memset => calloc

2014-05-25 Thread Benjamin Baier
On Sun, 25 May 2014 10:08:06 +0100 Stuart Henderson wrote: > There are a couple like this: > > > - pre_comp = malloc(num_points * 17 * 3 * sizeof(felem)); > > + pre_comp = calloc(num_points * 17 * 3, sizeof(felem)); > > Wouldn't they be better like this? > > pr

Re: [PATCH SET] malloc + memset => calloc

2014-05-25 Thread Stuart Henderson
On 2014/05/25 09:08, Benjamin Baier wrote: There are a couple like this: > - pre_comp = malloc(num_points * 17 * 3 * sizeof(felem)); > + pre_comp = calloc(num_points * 17 * 3, sizeof(felem)); Wouldn't they be better like this? pre_comp = calloc(num_points

Re: [PATCH SET] malloc + memset => calloc

2014-05-25 Thread Benjamin Baier
Now with correct tabs... sorry. Hi tech@ I'm just geting into the OpenBSD source code, and what better way to learn than with real "work"... Some malloc/memset to calloc changes. More to come if this kind of work is appreciated. Index: answer.c

[PATCH SET] malloc + memset => calloc

2014-05-24 Thread Benjamin Baier
Hi tech@ I'm just geting into the OpenBSD source code, and what better way to learn than with real "work"... Some malloc/memset to calloc changes. More to come if this kind of work is appreciated. Index: answer.c === RCS file: