aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/iptrace.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-09 16:44:15 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-09 23:45:30 +0000
commit45e462985db891248ffcb9db21e6b66733de0b84 (patch)
tree90d031f9769c07abaea83330a58dd9d3933eb7b1 /wiretap/iptrace.c
parent112c90a04b778958985b02b9663743cea1039f47 (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/iptrace.c')
-rw-r--r--wiretap/iptrace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/iptrace.c b/wiretap/iptrace.c
index 317d922215..c652af700d 100644
--- a/wiretap/iptrace.c
+++ b/wiretap/iptrace.c
@@ -49,14 +49,14 @@ static int wtap_encap_ift(unsigned int ift);
#define NAME_SIZE 11
-int iptrace_open(wtap *wth, int *err, gchar **err_info)
+wtap_open_return_val iptrace_open(wtap *wth, int *err, gchar **err_info)
{
char name[NAME_SIZE+1];
if (!wtap_read_bytes(wth->fh, name, NAME_SIZE, err, err_info)) {
if (*err != WTAP_ERR_SHORT_READ)
- return -1;
- return 0;
+ return WTAP_OPEN_ERROR;
+ return WTAP_OPEN_NOT_MINE;
}
name[NAME_SIZE] = '\0';
@@ -73,10 +73,10 @@ int iptrace_open(wtap *wth, int *err, gchar **err_info)
wth->file_tsprec = WTAP_TSPREC_NSEC;
}
else {
- return 0;
+ return WTAP_OPEN_NOT_MINE;
}
- return 1;
+ return WTAP_OPEN_MINE;
}
/***********************************************************