aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-03-05 08:40:27 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-03-05 08:40:27 +0000
commit6a5b1c2de1aafe74c901200135839a32151b3257 (patch)
tree2c75bbaa81b557864090331ad07e44813683b7ea /file.c
parentba95ac6c6e371b82f1f91eef869c91b097510ec7 (diff)
Make "wtap_seek_read()" return TRUE on success and FALSE on error, like
"wtap_read()". Add some additional error checks to the Sniffer file reader. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4875 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index 4576514b39..5c9aa972e4 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.265 2002/03/05 05:58:27 guy Exp $
+ * $Id: file.c,v 1.266 2002/03/05 08:40:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1791,8 +1791,8 @@ save_cap_file(char *fname, capture_file *cf, gboolean save_filtered, gboolean sa
hdr.caplen = fdata->cap_len;
hdr.len = fdata->pkt_len;
hdr.pkt_encap = fdata->lnk_t;
- if (wtap_seek_read(cf->wth, fdata->file_off, &pseudo_header,
- pd, fdata->cap_len, &err) == -1) {
+ if (!wtap_seek_read(cf->wth, fdata->file_off, &pseudo_header,
+ pd, fdata->cap_len, &err)) {
simple_dialog(ESD_TYPE_CRIT, NULL,
file_read_error_message(err), cf->filename);
wtap_dump_close(pdh, &err);