check rs_attr_find return code correctly
authorLuke Howard <lukeh@padl.com>
Mon, 14 Nov 2011 03:41:11 +0000 (14:41 +1100)
committerLuke Howard <lukeh@padl.com>
Wed, 11 Jan 2012 03:18:43 +0000 (14:18 +1100)
mech_eap/util_radius.cpp

index b8dea03..e9c0d64 100644 (file)
@@ -296,7 +296,7 @@ getAttributeId(const gss_buffer_t desc,
 
     if (!isdigit(*s)) {
         /* No digits */
-        ret = rs_attr_find(s, &attrid->second, &attrid->first);
+        ret = (rs_attr_find(s, &attrid->second, &attrid->first) == RSE_OK);
     } else {
         char *s2;
         unsigned int tmp = strtoul(s, &s2, 10);