diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-02-03 06:31:30 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-02-03 06:31:30 +0000 |
commit | a82c49732b57402034d26a949bae2736bdecd3a0 (patch) | |
tree | 75e068ac6f15b9a5033e9df608b9d73d1cf8620b /wiretap/file.c | |
parent | 58f1df6a34e86421ca80a8c85c25eef587c611aa (diff) |
Change from Ed Meaney - write capture files in binary, rather than ASCII
("w" and "wb" are the same on UNIX, but not on Win32).
svn path=/trunk/; revision=1598
Diffstat (limited to 'wiretap/file.c')
-rw-r--r-- | wiretap/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/file.c b/wiretap/file.c index 48745adf9b..df408fc4a5 100644 --- a/wiretap/file.c +++ b/wiretap/file.c @@ -1,6 +1,6 @@ /* file.c * - * $Id: file.c,v 1.47 2000/01/24 19:16:39 gram Exp $ + * $Id: file.c,v 1.48 2000/02/03 06:29:07 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -337,7 +337,7 @@ wtap_dumper* wtap_dump_open(const char *filename, int filetype, int encap, /* In case "fopen()" fails but doesn't set "errno", set "errno" to a generic "the open failed" error. */ errno = WTAP_ERR_CANT_OPEN; - fh = fopen(filename, "w"); + fh = fopen(filename, "wb"); if (fh == NULL) { *err = errno; return NULL; /* can't create file */ @@ -353,7 +353,7 @@ wtap_dumper* wtap_dump_fdopen(int fd, int filetype, int encap, int snaplen, /* In case "fopen()" fails but doesn't set "errno", set "errno" to a generic "the open failed" error. */ errno = WTAP_ERR_CANT_OPEN; - fh = fdopen(fd, "w"); + fh = fdopen(fd, "wb"); if (fh == NULL) { *err = errno; return NULL; /* can't create standard I/O stream */ |