]> jfr.im git - solanum.git/commitdiff
In capability_get(), if a capability is not found, return 0 instead of all-ones.
authorJilles Tjoelker <redacted>
Tue, 3 Jul 2012 17:16:31 +0000 (19:16 +0200)
committerJilles Tjoelker <redacted>
Tue, 3 Jul 2012 17:16:31 +0000 (19:16 +0200)
Returning all-ones will set all caps if an unknown cap name is passed.

src/capability.c

index f44b0a75168e5abd0ea3e597d77e913e38cef674..c999d6467c45eba5b392efbd4c2004da796d53a6 100644 (file)
@@ -51,7 +51,7 @@ capability_get(struct CapabilityIndex *idx, const char *cap)
        if (entry != NULL && !(entry->flags & CAP_ORPHANED))
                return (1 << entry->value);
 
-       return 0xFFFFFFFF;
+       return 0;
 }
 
 unsigned int