diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-09-24 05:49:53 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-09-24 05:49:53 +0000 |
commit | a9c36a4b69526ee098319d31d5930b8678f4974f (patch) | |
tree | 731abbf198b006163c900ae3da97d6b62a2fd0de /wiretap/file.c | |
parent | 702b8f7aed6aed8775d9c28e84d830f6216b8080 (diff) |
Fix it so that it builds with "--disable-zlib".
The "fh" member of a "wtap" structure points to something constructed
from the "fd" member of that structure, so that closing the stream
referred to by "fh" also closes the underlying file descriptor; get rid
of an unnecessary close of "wth->fd".
svn path=/trunk/; revision=720
Diffstat (limited to 'wiretap/file.c')
-rw-r--r-- | wiretap/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/wiretap/file.c b/wiretap/file.c index 6a1ec8b154..bedaf92b6f 100644 --- a/wiretap/file.c +++ b/wiretap/file.c @@ -1,6 +1,6 @@ /* file.c * - * $Id: file.c,v 1.23 1999/09/23 05:00:59 guy Exp $ + * $Id: file.c,v 1.24 1999/09/24 05:49:50 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu> @@ -29,8 +29,8 @@ #include <stdlib.h> #include <sys/stat.h> #include <errno.h> -#include "file.h" #include "wtap.h" +#include "file.h" #include "buffer.h" #include "lanalyzer.h" #include "ngsniffer.h" @@ -130,7 +130,6 @@ wtap* wtap_open_offline(const char *filename, int *err) /* I/O error - give up */ *err = errno; file_close(wth->fh); - close(wth->fd); free(wth); return NULL; |