check rs_attr_find return code correctly
[mech_eap.git] / 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);