aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/k12text.l
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-02-04 08:10:08 +0000
committerGuy Harris <guy@alum.mit.edu>2011-02-04 08:10:08 +0000
commit4849599a131d2938cb947ecae0ed5a8d3d7a32e7 (patch)
treec897bf1abc1cf7fb4d126ad0c0d9f04903feac62 /wiretap/k12text.l
parent52638933cbb8507c1521dc40fac98c01880c286e (diff)
Set *err before *err_info - that's how it's done in most other modules.
svn path=/trunk/; revision=35807
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 805e386cb4..edea3d3bd3 100644
--- a/wiretap/k12text.l
+++ b/wiretap/k12text.l
@@ -233,11 +233,11 @@ static gboolean k12text_read(wtap *wth, int *err, char ** err_info, gint64 *data
if (ok_frame == FALSE) {
if (at_eof) {
- *err_info = NULL;
*err = 0;
+ *err_info = NULL;
} else {
- *err_info = error_str;
*err = WTAP_ERR_BAD_RECORD;
+ *err_info = error_str;
}
return FALSE;
}
@@ -270,21 +270,21 @@ static gboolean k12text_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_
yylex();
if (ok_frame == FALSE) {
+ *err = WTAP_ERR_BAD_RECORD;
if (at_eof) {
/* What happened ? The desired frame was previously read without a problem */
*err_info = g_strdup("Unexpected EOF (program error ?)");
} else {
*err_info = error_str;
}
- *err = WTAP_ERR_BAD_RECORD;
return FALSE;
}
/* verify frame length parsed this time against original frame length */
if (ii != (guint)length) {
/* What happened ? This now seems to have a different length than originally */
- *err_info = g_strdup("Incorrect frame length (program error ?)");
*err = WTAP_ERR_BAD_RECORD;
+ *err_info = g_strdup("Incorrect frame length (program error ?)");
return FALSE;
}