Fixed check in pairvalidate
authorHerwin Weststrate <herwin@snt.utwente.nl>
Fri, 17 Oct 2014 17:49:23 +0000 (19:49 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 18 Oct 2014 17:35:19 +0000 (13:35 -0400)
commitcd5cd7d2ed94702c850803a66c0bdbc2492468db
tree8576964b309dba4de347006e657a6e2b0aa4800e
parenta116a1e19f69798bacde790b6bee324d9eb6998c
Fixed check in pairvalidate

The only commit in this series that actually changes some behaviour. The test was supposed to check if one of the values (match and check) was false, while the other was true. Because the while loop already validated that at least one of them is true, we can get the desired behaviour by just checking if one of them is false. The old behaviour only tested to see if match was false.

This code is not tested in the unit tests. It would be nice to have it in there, but I've got no idea how to write that.

This fixes the following message of cppcheck:

[src/lib/valuepair.c:547]: (style) Same expression on both sides of '||'.
src/lib/valuepair.c