Re: pfctl: Fix function name in errx(3) message

2017-03-28 Thread Sebastian Benoit
Gleydson Soares(gsoa...@gmail.com) on 2017.03.27 16:43:28 -0300: > > What about the other calls to calloc(3); shouldn't we keep their > > respective error messages consistent? > > seems that several err()/errx() calls in pfctl code are hard-coding > the function name... > > instead of hard code,

Re: pfctl: Fix function name in errx(3) message

2017-03-27 Thread Ingo Schwarze
Hi, Gleydson Soares wrote on Mon, Mar 27, 2017 at 04:43:28PM -0300: > instead of hard code, maybe those calls should be changed to: > errx(1, "%s: anystring", __func__) the usual OpenBSD idiom is if ((p = malloc(size)) == NULL) err(1, NULL); see EXAMPLES in malloc(3), s

Re: pfctl: Fix function name in errx(3) message

2017-03-27 Thread Gleydson Soares
> What about the other calls to calloc(3); shouldn't we keep their > respective error messages consistent? seems that several err()/errx() calls in pfctl code are hard-coding the function name... instead of hard code, maybe those calls should be changed to: errx(1, "%s: anystring", __func__)

Re: pfctl: Fix function name in errx(3) message

2017-03-27 Thread Klemens Nanni
On Mon, Mar 27, 2017 at 07:39:09PM +0200, Sebastian Benoit wrote: i commited a err(1, "calloc") instead. What about the other calls to calloc(3); shouldn't we keep their respective error messages consistent?

Re: pfctl: Fix function name in errx(3) message

2017-03-27 Thread Sebastian Benoit
Klemens Nanni(k...@posteo.org) on 2017.03.25 12:39:48 +0100: > Index: pfctl.c > === > RCS file: /cvs/src/sbin/pfctl/pfctl.c,v > retrieving revision 1.338 > diff -u -p -r1.338 pfctl.c > --- pfctl.c 26 Jan 2017 08:24:34 - 1.

pfctl: Fix function name in errx(3) message

2017-03-25 Thread Klemens Nanni
Index: pfctl.c === RCS file: /cvs/src/sbin/pfctl/pfctl.c,v retrieving revision 1.338 diff -u -p -r1.338 pfctl.c --- pfctl.c 26 Jan 2017 08:24:34 - 1.338 +++ pfctl.c 25 Mar 2017 11:37:01 - @@ -753,7 +753,7 @@ pfctl