You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Bryan Call (JIRA)" <ji...@apache.org> on 2016/08/17 18:38:20 UTC

[jira] [Commented] (TS-4371) Redundant for-loop

    [ https://issues.apache.org/jira/browse/TS-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15425138#comment-15425138 ] 

Bryan Call commented on TS-4371:
--------------------------------

[~kreats]
Please make a pull request for this.

> 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
>             Fix For: 7.1.0
>
>
> 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)