1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: remove duplicate search of pointer in hashtable for evaluation of "hdata_count"

This commit is contained in:
Sébastien Helleu
2024-06-14 17:37:47 +02:00
parent c83b08fae8
commit ce79d218a4
-9
View File
@@ -1196,15 +1196,6 @@ eval_hdata_count (const char *text, struct t_eval_context *eval_context)
}
}
if (!pointer)
{
pointer = hashtable_get (eval_context->pointers, hdata_name);
if (!pointer)
goto end;
if (!hdata_check_pointer (hdata, NULL, pointer))
goto end;
}
count = hdata_count (hdata, pointer);
snprintf (str_count, sizeof (str_count), "%d", count);
value = strdup (str_count);