diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-03-05 08:40:27 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-03-05 08:40:27 +0000 |
commit | 6a5b1c2de1aafe74c901200135839a32151b3257 (patch) | |
tree | 2c75bbaa81b557864090331ad07e44813683b7ea /file.c | |
parent | ba95ac6c6e371b82f1f91eef869c91b097510ec7 (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |