diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-10-09 16:44:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-10-09 23:45:30 +0000 |
commit | 45e462985db891248ffcb9db21e6b66733de0b84 (patch) | |
tree | 90d031f9769c07abaea83330a58dd9d3933eb7b1 /wiretap/tnef.c | |
parent | 112c90a04b778958985b02b9663743cea1039f47 (diff) |
Use an enum for the open-routine return value, as per Evan Huus's suggestion.
Clean up some things we ran across while making those changes.
Change-Id: Ic0d8943d36e6e120d7af0a6148fad98015d1e83e
Reviewed-on: https://code.wireshark.org/review/4581
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/tnef.c')
-rw-r--r-- | wiretap/tnef.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/tnef.c b/wiretap/tnef.c index 3dcc5e40ca..85115a11b2 100644 --- a/wiretap/tnef.c +++ b/wiretap/tnef.c @@ -101,15 +101,15 @@ int tnef_open(wtap *wth, int *err, gchar **err_info) guint32 magic; if (!wtap_read_bytes(wth->fh, &magic, sizeof magic, err, err_info)) - return (*err != WTAP_ERR_SHORT_READ) ? -1 : 0; + return (*err != WTAP_ERR_SHORT_READ) ? WTAP_OPEN_ERROR : WTAP_OPEN_NOT_MINE; if (GUINT32_TO_LE(magic) != TNEF_SIGNATURE) /* Not a tnef file */ - return 0; + return WTAP_OPEN_NOT_MINE; /* seek back to the start of the file */ if (file_seek(wth->fh, 0, SEEK_SET, err) == -1) - return -1; + return WTAP_OPEN_ERROR; wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_TNEF; wth->file_encap = WTAP_ENCAP_TNEF; @@ -119,5 +119,5 @@ int tnef_open(wtap *wth, int *err, gchar **err_info) wth->subtype_seek_read = tnef_seek_read; wth->file_tsprec = WTAP_TSPREC_SEC; - return 1; + return WTAP_OPEN_MINE; } |