tcpdump mailing list archives

Re: How to check if pcap_t is really free?


From: Gert Doering <gert () greenie muc de>
Date: Thu, 20 Jun 2013 19:16:46 +0200

Hi,

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)

gert

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert () greenie muc de
fax: +49-89-35655025                        gert () net informatik tu-muenchen de
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: