Commit d582147d authored by kolla's avatar kolla Committed by kolla

Missing parantheses bug spotted by Daniel Bertolo

Reformatted while loop by Kolbjørn


git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@513 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent 148cf903
...@@ -979,15 +979,16 @@ void dorewriterm(struct radmsg *msg, uint8_t *rmattrs, uint32_t *rmvattrs) { ...@@ -979,15 +979,16 @@ void dorewriterm(struct radmsg *msg, uint8_t *rmattrs, uint32_t *rmvattrs) {
p = NULL; p = NULL;
n = list_first(msg->attrs); n = list_first(msg->attrs);
while (n) { while (n) {
attr = (struct tlv *)n->data; attr = (struct tlv *)n->data;
if ((rmattrs && strchr((char *)rmattrs, attr->t)) || if ((rmattrs && strchr((char *)rmattrs, attr->t)) ||
(rmvattrs && attr->t == RAD_Attr_Vendor_Specific && dovendorrewriterm(attr, rmvattrs))) { (rmvattrs && attr->t == RAD_Attr_Vendor_Specific && dovendorrewriterm(attr, rmvattrs))) {
list_removedata(msg->attrs, attr); list_removedata(msg->attrs, attr);
freetlv(attr); freetlv(attr);
n = p ? list_next(p) : list_first(msg->attrs); n = p ? list_next(p) : list_first(msg->attrs);
} else } else {
p = n; p = n;
n = list_next(n); n = list_next(n);
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment