From d582147d3b0858bb0ecc5ba754151ec86826494e Mon Sep 17 00:00:00 2001 From: kolla Date: Wed, 13 Jan 2010 09:23:12 +0000 Subject: =?UTF-8?q?Missing=20parantheses=20bug=20spotted=20by=20Daniel=20B?= =?UTF-8?q?ertolo=20Reformatted=20while=20loop=20by=20Kolbj=C3=B8rn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@513 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'radsecproxy.c') diff --git a/radsecproxy.c b/radsecproxy.c index 37bf4cb..9ed4d70 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); + } } } -- cgit v1.2.3