summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkolla <kolla>2010-01-19 14:03:21 +0000
committerkolla <kolla@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2010-01-19 14:03:21 +0000
commit6c308d63772792b64d3468b89d13678c64234252 (patch)
treea35fad58ac82f6c76d1b873e94d06311dba4d8ce
parentc6c934fab7cf3e36bff7739415d2465457235b78 (diff)
Missing parantheses bug spotted by Daniel Bertolo
Reformatted while loop by Kolbjørn git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.3@514 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 11f168c..fae689f 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -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);
+ }
}
}