summaryrefslogtreecommitdiff
path: root/wiretap/k12text.l
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/k12text.l
parent112c90a04b778958985b02b9663743cea1039f47 (diff)
downloadwireshark-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/k12text.l')
-rw-r--r--wiretap/k12text.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/k12text.l b/wiretap/k12text.l
index b281dfe15f..69a2a982ef 100644
--- a/wiretap/k12text.l
+++ b/wiretap/k12text.l
@@ -319,7 +319,7 @@ k12text_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, Buffer *
return TRUE;
}
-int
+wtap_open_return_val
k12text_open(wtap *wth, int *err, gchar **err_info _U_)
{
k12text_t *k12text;
@@ -329,10 +329,10 @@ k12text_open(wtap *wth, int *err, gchar **err_info _U_)
BEGIN(MAGIC);
yylex();
- if (! is_k12text) return 0;
+ if (! is_k12text) return WTAP_OPEN_NOT_MINE;
if ( file_seek(wth->fh, 0, SEEK_SET, err) == -1) {
- return -1;
+ return WTAP_OPEN_ERROR;
}
k12text = (k12text_t *)g_malloc(sizeof(k12text_t));
@@ -345,7 +345,7 @@ k12text_open(wtap *wth, int *err, gchar **err_info _U_)
wth->subtype_seek_read = k12text_seek_read;
wth->file_tsprec = WTAP_TSPREC_NSEC;
- return 1;
+ return WTAP_OPEN_MINE;
}