diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-31 14:33:48 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-31 22:34:20 +0000 |
commit | 07d0a59cb4e2660cd4fc175bbcd6961cc7d3a64c (patch) | |
tree | b03170af65543e51504973b8b108af82020bfec6 /epan/wslua/wslua_listener.c | |
parent | bf0c98d53b5bb549c494d1d75032ff477ad2a05a (diff) |
Don't cast away constness.
Change-Id: I37a1923c2e463346244cd5e56daf22122d119d78
Reviewed-on: https://code.wireshark.org/review/12976
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/wslua/wslua_listener.c')
-rw-r--r-- | epan/wslua/wslua_listener.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c index ed606c42bd..53b6a708ef 100644 --- a/epan/wslua/wslua_listener.c +++ b/epan/wslua/wslua_listener.c @@ -44,7 +44,7 @@ static int tap_packet_cb_error_handler(lua_State* L) { static gchar* last_error = NULL; static int repeated = 0; static int next = 2; - const gchar* where = (lua_pinfo) ? + gchar* where = (lua_pinfo) ? wmem_strdup_printf(NULL, "Lua: on packet %i Error During execution of Listener Packet Callback",lua_pinfo->fd->num) : wmem_strdup_printf(NULL, "Lua: Error During execution of Listener Packet Callback") ; @@ -56,8 +56,7 @@ static int tap_packet_cb_error_handler(lua_State* L) { last_error = g_strdup(error); repeated = 0; next = 2; - wmem_free(NULL, (void*) where); - where = NULL; + wmem_free(NULL, where); return 0; } @@ -76,7 +75,7 @@ static int tap_packet_cb_error_handler(lua_State* L) { report_failure("%s:\n %s",where,error); } - wmem_free(NULL, (void*) where); + wmem_free(NULL, where); return 0; } |