Skip to content

Commit

Permalink
Missing parantheses bug spotted by Daniel Bertolo
Browse files Browse the repository at this point in the history
Reformatted while loop by Kolbjørn


git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@513 e88ac4ed-0b26-0410-9574-a7f39faa03bf
  • Loading branch information
kolla authored and kolla committed Jan 13, 2010
1 parent 148cf90 commit d582147
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,15 +979,16 @@ void dorewriterm(struct radmsg *msg, uint8_t *rmattrs, uint32_t *rmvattrs) {
p = NULL;
n = list_first(msg->attrs);
while (n) {
attr = (struct tlv *)n->data;
if ((rmattrs && strchr((char *)rmattrs, attr->t)) ||
(rmvattrs && attr->t == RAD_Attr_Vendor_Specific && dovendorrewriterm(attr, rmvattrs))) {
list_removedata(msg->attrs, attr);
freetlv(attr);
n = p ? list_next(p) : list_first(msg->attrs);
} else
p = n;
n = list_next(n);
attr = (struct tlv *)n->data;
if ((rmattrs && strchr((char *)rmattrs, attr->t)) ||
(rmvattrs && attr->t == RAD_Attr_Vendor_Specific && dovendorrewriterm(attr, rmvattrs))) {
list_removedata(msg->attrs, attr);
freetlv(attr);
n = p ? list_next(p) : list_first(msg->attrs);
} else {
p = n;
n = list_next(n);
}
}
}

Expand Down

0 comments on commit d582147

Please sign in to comment.