From 58d61cb153761979e162cd80162bac941797c40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 29 Aug 2023 09:53:08 +0200 Subject: core: remove unused variable old_value --- src/core/wee-eval.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/wee-eval.c b/src/core/wee-eval.c index 512961d0c..791c4241a 100644 --- a/src/core/wee-eval.c +++ b/src/core/wee-eval.c @@ -1167,7 +1167,7 @@ char * eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path, struct t_eval_context *eval_context) { - char *value, *old_value, *var_name, str_value[128], *pos, *property; + char *value, *var_name, str_value[128], *pos, *property; const char *ptr_value, *hdata_name, *ptr_var_name, *pos_open_paren; int type, debug_id; struct t_hashtable *hashtable; @@ -1327,13 +1327,12 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path, goto end; hdata = hook_hdata_get (NULL, hdata_name); - old_value = value; + if (value) + free (value); value = eval_hdata_get_value (hdata, pointer, - (pos) ? pos + 1 : NULL, + pos + 1, eval_context); - if (old_value) - free (old_value); } end: -- cgit v1.2.3