Hi, On Thu, Jun 20, 2013 at 10:36:27PM +0300, Nadav Vinik wrote: > On 20 June 2013 20:16, Gert Doering <g...@greenie.muc.de> wrote: > > > > On Thu, Jun 20, 2013 at 07:44:00PM +0300, Nadav Vinik wrote: > > > After pcap_close handle is not NULL since the following printf is not > > print > > > > > > thanks > > > Nadav > > > > > > pcap_close(handle); > > > if(handle == NULL) { > > > > In C, this will never ever change the value of "handle", unless > > pcap_close() is a macro, which it isn't. > > > > This is not pascal, we have no way for a function to modify it's > > arguments silently (you'd need to pass a pointer, &handle, to achiee > > that) > > Hoever if I change to pcap_close(&handle) I get the following error:
Don't. That was purely hypothetic. Read up on pointers and C. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de _______________________________________________ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers