Use rb_dlink_list_length... == 0, not !rb_dlink_list_length

This commit is contained in:
Elizabeth Myers 2016-04-02 22:45:52 -05:00
parent 34bc7caeae
commit ffa79a9516
2 changed files with 5 additions and 5 deletions

View file

@ -621,7 +621,7 @@ opm_start(struct auth_client *auth)
rb_dlink_node *ptr;
struct opm_lookup *lookup = rb_malloc(sizeof(struct opm_lookup));
if(!opm_enable || !rb_dlink_list_length(&proxy_scanners))
if(!opm_enable || rb_dlink_list_length(&proxy_scanners) == 0)
{
notice_client(auth->cid, "*** Proxy scanning disabled, not scanning");
return true;
@ -836,7 +836,7 @@ delete_opm_scanner(const char *key __unused, int parc __unused, const char **par
rb_dlinkDelete(&scan->node, &lookup->scans);
rb_free(scan);
if(!rb_dlink_list_length(&lookup->scans))
if(rb_dlink_list_length(&lookup->scans) == 0)
opm_cancel(auth);
break;
@ -847,7 +847,7 @@ delete_opm_scanner(const char *key __unused, int parc __unused, const char **par
rb_dlinkDelete(&proxy->node, &proxy_scanners);
rb_free(proxy);
if(!rb_dlink_list_length(proxy_scanners))
if(rb_dlink_list_length(&proxy_scanners) == 0)
opm_enable = false;
}

View file

@ -2053,7 +2053,7 @@ conf_end_opm(struct TopConf *tc)
rb_dlink_node *ptr, *nptr;
bool fail = false;
if(!rb_dlink_list_length(&yy_opm_scanner_list))
if(rb_dlink_list_length(&yy_opm_scanner_list) == 0)
{
conf_report_error("No opm scanners configured -- disabling opm.");
fail = true;
@ -2434,7 +2434,7 @@ conf_call_set(struct TopConf *tc, char *item, conf_parm_t * value)
if((cf = find_conf_item(tc, item)) == NULL)
{
conf_report_error
("Non-existant configuration setting %s::%s.", tc->tc_name, (char *) item);
("Non-existent configuration setting %s::%s.", tc->tc_name, (char *) item);
return -1;
}