You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "kreats (JIRA)" <ji...@apache.org> on 2016/04/21 09:41:25 UTC
[jira] [Created] (TS-4371) redundant for-loop
kreats created TS-4371:
--------------------------
Summary: redundant for-loop
Key: TS-4371
URL: https://issues.apache.org/jira/browse/TS-4371
Project: Traffic Server
Issue Type: Improvement
Components: Core
Reporter: kreats
redundant for-loop proxy/http/remap module.
*file* proxy/http/remap/AclFiltering.cc
*function* acl_filter_rule::requeue_in_passive_list
*line* 194
[*code*|https://github.com/apache/trafficserver/blob/master/proxy/http/remap/AclFiltering.cc#L194]
{code}
void
acl_filter_rule::requeue_in_passive_list(acl_filter_rule **list, acl_filter_rule *rp)
{
if (likely(list && rp)) {
if (rp->active_queue_flag) {
acl_filter_rule **rpp;
for (rpp = list; *rpp; rpp = &((*rpp)->next)) {
if (*rpp == rp) {
*rpp = rp->next;
break;
}
}
for (rpp = list; *rpp; rpp = &((*rpp)->next))
;
(*rpp = rp)->next = NULL;
rp->active_queue_flag = 0;
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)