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:
parent
a0f46daa4a
commit
378de035de
1 changed files with 5 additions and 3 deletions
6
dlhist.c
6
dlhist.c
|
|
@ -257,9 +257,11 @@ error:
|
||||||
|
|
||||||
int dlhist_lookup(const char *url) {
|
int dlhist_lookup(const char *url) {
|
||||||
|
|
||||||
if (table_size < 1)
|
if (table_size) {
|
||||||
|
struct hash_entry *he = lookup(url);
|
||||||
|
return !he_empty(he);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
return !he_empty(lookup(url));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dlhist_update(const char *url) {
|
void dlhist_update(const char *url) {
|
||||||
|
|
|
||||||
Reference in a new issue