diff options
author | Guy Harris <guy@alum.mit.edu> | 2008-05-30 02:34:45 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2008-05-30 02:34:45 +0000 |
commit | 3ff150d6d69e8e0c9104db75bcfd536be9689f57 (patch) | |
tree | b02f23e7133cda19e7f0aa626bc6461085934f80 /wiretap/k12text.l | |
parent | 1fc6505fb87e6d968c8197f9e8a0e636c8c4feab (diff) |
wtap_read() and wtap_seek_read(), and thus the functions that it calls,
are expected to return a g_mallocated error string; that's why they fill
in a gchar **, not a const gchar **. g_strdup() the argument to
KERROR(), so it's g_mallocated.
svn path=/trunk/; revision=25398
Diffstat (limited to 'wiretap/k12text.l')
-rw-r--r-- | wiretap/k12text.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/k12text.l b/wiretap/k12text.l index 0967cab63d..0a2241f1bf 100644 --- a/wiretap/k12text.l +++ b/wiretap/k12text.l @@ -71,14 +71,14 @@ static gboolean is_k12text; static gboolean at_eof; static guint junk_chars = 0; static void finalize_frame(void); -static const gchar* error_str; +static gchar* error_str; static gint64 cum_offset; static gboolean ok_frame; static FILE_T yy_fh; #define RESET() do { ok_frame = FALSE; h=0; m=0; s=0; ns=0; ms=0; i=0; is_k12text=FALSE; junk_chars = 0; error_str = NULL; } while(0) -#define KERROR(text) do { error_str = (text); yyterminate(); } while(0) +#define KERROR(text) do { error_str = g_strdup(text); yyterminate(); } while(0) #define START_PACKET RESET #define SET_HOURS(text) h = strtoul(text,NULL,10) #define SET_MINUTES(text) m = strtoul(text,NULL,10) |