mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
Use rb_dlink_list_length... == 0, not !rb_dlink_list_length
This commit is contained in:
parent
34bc7caeae
commit
ffa79a9516
2 changed files with 5 additions and 5 deletions
|
@ -621,7 +621,7 @@ opm_start(struct auth_client *auth)
|
||||||
rb_dlink_node *ptr;
|
rb_dlink_node *ptr;
|
||||||
struct opm_lookup *lookup = rb_malloc(sizeof(struct opm_lookup));
|
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");
|
notice_client(auth->cid, "*** Proxy scanning disabled, not scanning");
|
||||||
return true;
|
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_dlinkDelete(&scan->node, &lookup->scans);
|
||||||
rb_free(scan);
|
rb_free(scan);
|
||||||
|
|
||||||
if(!rb_dlink_list_length(&lookup->scans))
|
if(rb_dlink_list_length(&lookup->scans) == 0)
|
||||||
opm_cancel(auth);
|
opm_cancel(auth);
|
||||||
|
|
||||||
break;
|
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_dlinkDelete(&proxy->node, &proxy_scanners);
|
||||||
rb_free(proxy);
|
rb_free(proxy);
|
||||||
|
|
||||||
if(!rb_dlink_list_length(proxy_scanners))
|
if(rb_dlink_list_length(&proxy_scanners) == 0)
|
||||||
opm_enable = false;
|
opm_enable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2053,7 +2053,7 @@ conf_end_opm(struct TopConf *tc)
|
||||||
rb_dlink_node *ptr, *nptr;
|
rb_dlink_node *ptr, *nptr;
|
||||||
bool fail = false;
|
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.");
|
conf_report_error("No opm scanners configured -- disabling opm.");
|
||||||
fail = true;
|
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)
|
if((cf = find_conf_item(tc, item)) == NULL)
|
||||||
{
|
{
|
||||||
conf_report_error
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue