summaryrefslogtreecommitdiff
path: root/src/core/wee-eval.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-08-29 09:53:08 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-08-29 09:53:08 +0200
commit58d61cb153761979e162cd80162bac941797c40e (patch)
tree4a525a865dcde4fbd5211047518041042c34a68d /src/core/wee-eval.c
parent32f52ae23621e24d75de3cb5a3e3ab20677e5bcc (diff)
downloadweechat-58d61cb153761979e162cd80162bac941797c40e.zip
core: remove unused variable old_value
Diffstat (limited to 'src/core/wee-eval.c')
-rw-r--r--src/core/wee-eval.c9
1 files changed, 4 insertions, 5 deletions
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: