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:
Guy Harris 2015-12-31 14:33:48 -08:00
parent bf0c98d53b
commit 07d0a59cb4
1 changed files with 3 additions and 4 deletions

View File

@ -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;
}