Re: Goodbye to you my file descriptor - take 3

2013-01-03 Thread Maxime Villard
Le 29/12/2012 08:35, Philip Guenther a écrit : > On Fri, Dec 28, 2012 at 10:16 PM, Maxime Villard wrote: >> Le 29/12/2012 02:46, Philip Guenther a écrit : >>> On Thu, Dec 27, 2012 at 5:04 AM, Maxime Villard wrote: Well, as no one seems to give a fuck on tech@, I put a more glamourous ti

Re: Goodbye to you my file descriptor - take 3

2013-01-02 Thread Christiano F. Haesbaert
On Mon, Dec 31, 2012 at 04:53:15PM +1100, Aaron Mason wrote: > Ok, I just tried freeing NULL, and it did nothing. Granted it was on > a Linux system but still... > > I stand by my argument that there's no clear improvement, especially > on a modern system. It's less code, and code gets copied, a

Re: Goodbye to you my file descriptor - take 3

2012-12-31 Thread Maxime Villard
Le 31/12/2012 08:33, Otto Moerbeek a écrit : > On Mon, Dec 31, 2012 at 04:53:15PM +1100, Aaron Mason wrote: > >> Ok, I just tried freeing NULL, and it did nothing. Granted it was on >> a Linux system but still... >> > > Wrong method, Just check the definition of free(3). It is OK to call > free(

Re: Goodbye to you my file descriptor - take 3

2012-12-30 Thread Otto Moerbeek
On Mon, Dec 31, 2012 at 04:53:15PM +1100, Aaron Mason wrote: > Ok, I just tried freeing NULL, and it did nothing. Granted it was on > a Linux system but still... > Wrong method, Just check the definition of free(3). It is OK to call free(3) on a NULL pointer since C89 at least. -Otto

Re: Goodbye to you my file descriptor - take 3

2012-12-30 Thread Ryan McBride
On Mon, Dec 31, 2012 at 04:53:15PM +1100, Aaron Mason wrote: > Ok, I just tried freeing NULL, and it did nothing. Granted it was on > a Linux system but still... free() handles a NULL pointer by doing nothing, and it will behave this way on any posix system compliant system. However, on an OpenBS

Re: Goodbye to you my file descriptor - take 3

2012-12-30 Thread Aaron Mason
Ok, I just tried freeing NULL, and it did nothing. Granted it was on a Linux system but still... I stand by my argument that there's no clear improvement, especially on a modern system. On Mon, Dec 31, 2012 at 4:50 PM, Aaron Mason wrote: > Maxime > > I'm not entirely clear on what you hoped to

Re: Goodbye to you my file descriptor - take 3

2012-12-30 Thread Aaron Mason
Maxime I'm not entirely clear on what you hoped to achieve with the diffs below, if anything you're inducing possible segfaults if any of those values are NULL. That aside, I fail to see how this could be construed as any sort of improvement. > Index: pfctl_osfp.c > =

Re: Goodbye to you my file descriptor - take 3

2012-12-28 Thread Philip Guenther
On Fri, Dec 28, 2012 at 10:16 PM, Maxime Villard wrote: > Le 29/12/2012 02:46, Philip Guenther a écrit : >> On Thu, Dec 27, 2012 at 5:04 AM, Maxime Villard wrote: >>> Well, as no one seems to give a fuck on tech@, I put a more >>> glamourous title here. >> >> The fd/FILE part of your diff changes

Re: Goodbye to you my file descriptor - take 3

2012-12-28 Thread Maxime Villard
Le 29/12/2012 02:46, Philip Guenther a écrit : > On Thu, Dec 27, 2012 at 5:04 AM, Maxime Villard wrote: >> Well, as no one seems to give a fuck on tech@, I put a more >> glamourous title here. > > The fd/FILE part of your diff changes the behavior of pfctl to be > incorrect when there are no stat

Re: Goodbye to you my file descriptor - take 3

2012-12-28 Thread Philip Guenther
On Thu, Dec 27, 2012 at 5:04 AM, Maxime Villard wrote: > Well, as no one seems to give a fuck on tech@, I put a more > glamourous title here. The fd/FILE part of your diff changes the behavior of pfctl to be incorrect when there are no states. Philip Guenther

Re: Goodbye to you my file descriptor - take 3

2012-12-28 Thread Christiano F. Haesbaert
You can enable a bunch of warnings with WARNINGS=Yes in our tree. On Dec 28, 2012 3:34 PM, "Kenneth R Westerback" wrote: > On Thu, Dec 27, 2012 at 02:04:24PM +0100, Maxime Villard wrote: > > Well, as no one seems to give a fuck on tech@, I put a more > > glamourous title here. > > > > btw, i wond

Re: Goodbye to you my file descriptor - take 3

2012-12-28 Thread Kenneth R Westerback
On Thu, Dec 27, 2012 at 02:04:24PM +0100, Maxime Villard wrote: > Well, as no one seems to give a fuck on tech@, I put a more > glamourous title here. > > btw, i wonder why you don't put -Wextra to the makefile, you would > see that there are a lot of unused parameters, comparisons between > signe

Goodbye to you my file descriptor - take 3

2012-12-27 Thread Maxime Villard
Well, as no one seems to give a fuck on tech@, I put a more glamourous title here. btw, i wonder why you don't put -Wextra to the makefile, you would see that there are a lot of unused parameters, comparisons between signed and unsigned, uninitialized vars, ... Message original