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/dbs-etherwatch.c | |
parent | 112c90a04b778958985b02b9663743cea1039f47 (diff) | |
download | wireshark-45e462985db891248ffcb9db21e6b66733de0b84.tar.gz |
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/dbs-etherwatch.c')
-rw-r--r-- | wiretap/dbs-etherwatch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c index 576dae7f2b..266ffa4cfc 100644 --- a/wiretap/dbs-etherwatch.c +++ b/wiretap/dbs-etherwatch.c @@ -176,13 +176,13 @@ static gboolean dbs_etherwatch_check_file_type(wtap *wth, int *err, } -int dbs_etherwatch_open(wtap *wth, int *err, gchar **err_info) +wtap_open_return_val dbs_etherwatch_open(wtap *wth, int *err, gchar **err_info) { /* Look for DBS ETHERWATCH header */ if (!dbs_etherwatch_check_file_type(wth, err, err_info)) { if (*err != 0 && *err != WTAP_ERR_SHORT_READ) - return -1; - return 0; + return WTAP_OPEN_ERROR; + return WTAP_OPEN_NOT_MINE; } wth->file_encap = WTAP_ENCAP_ETHERNET; @@ -192,7 +192,7 @@ int dbs_etherwatch_open(wtap *wth, int *err, gchar **err_info) wth->subtype_seek_read = dbs_etherwatch_seek_read; wth->file_tsprec = WTAP_TSPREC_CSEC; - return 1; + return WTAP_OPEN_MINE; } /* Find the next packet and parse it; called from wtap_read(). */ |