Don't cast away constness.
Change-Id: I37a1923c2e463346244cd5e56daf22122d119d78 Reviewed-on: https://code.wireshark.org/review/12976 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
bf0c98d53b
commit
07d0a59cb4
|
@ -44,7 +44,7 @@ static int tap_packet_cb_error_handler(lua_State* L) {
|
||||||
static gchar* last_error = NULL;
|
static gchar* last_error = NULL;
|
||||||
static int repeated = 0;
|
static int repeated = 0;
|
||||||
static int next = 2;
|
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: 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") ;
|
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);
|
last_error = g_strdup(error);
|
||||||
repeated = 0;
|
repeated = 0;
|
||||||
next = 2;
|
next = 2;
|
||||||
wmem_free(NULL, (void*) where);
|
wmem_free(NULL, where);
|
||||||
where = NULL;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +75,7 @@ static int tap_packet_cb_error_handler(lua_State* L) {
|
||||||
report_failure("%s:\n %s",where,error);
|
report_failure("%s:\n %s",where,error);
|
||||||
}
|
}
|
||||||
|
|
||||||
wmem_free(NULL, (void*) where);
|
wmem_free(NULL, where);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue