Archived
1
0
Fork 0

dlhist.c: dlhist_lookup: pass a variable to he_empty().

he_empty() is a macro, do not pass a function call as argument.
when the macro expands, the function will be called numerous times.
This commit is contained in:
Henrik Hautakoski 2011-11-03 14:36:10 +01:00
parent a0f46daa4a
commit 378de035de

View file

@ -257,9 +257,11 @@ error:
int dlhist_lookup(const char *url) { int dlhist_lookup(const char *url) {
if (table_size < 1) if (table_size) {
return 0; struct hash_entry *he = lookup(url);
return !he_empty(lookup(url)); return !he_empty(he);
}
return 0;
} }
void dlhist_update(const char *url) { void dlhist_update(const char *url) {