Ethereal-dev: [Ethereal-dev] Re: [Ethereal-cvs] rev 16411: /trunk/: pcap-util-unix.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Mon, 07 Nov 2005 09:51:05 +0100
guy@xxxxxxxxxxxx wrote:

User: guy
Date: 2005/11/07 02:35 AM

Log:
This is UN*X-only, so it doesn't need to use the eth_close() wrapper;
close() will be available.
Hi Guy, first of all thanks for fixing "my bugs". It's hard to do the Unix build right if you don't have a unix box available and it's two a clock in the morning...


IMHO it's not a good idea to use eth_close most of the time and only at some places just use close only.

This way:
it's harder to understand why sometimes close and sometimes eth_close is needed
it's hard to find missing wrapper occurrences using grep
if code is copied, it's likely to miss using eth_close when it's needed (but you'll get an error on the Win side, so it's quickly fixed)

Saying all this, if we have a wrapper layer we should use it at all appropriate places, even if it's not required at the specific place.

Regards, ULFL