diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-08-31 09:28:51 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-11 18:46:11 +1000 |
commit | a32cdadb7cbff255b5a0133a3bb54352d0d42f61 (patch) | |
tree | 8d8ac093e65941ebd57ced9a8f30f991fbcb4c6c /libcli | |
parent | 0b41ef789575e5194e9b499cf5fe0df4616f1bb8 (diff) | |
download | samba-a32cdadb7cbff255b5a0133a3bb54352d0d42f61.tar.gz samba-a32cdadb7cbff255b5a0133a3bb54352d0d42f61.tar.bz2 samba-a32cdadb7cbff255b5a0133a3bb54352d0d42f61.zip |
libcli/security Make sec_privilege_from_index() return SEC_PRIV_INVALID on failure
This is clearer and more consistent than using a magic -1 return
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/security/privileges.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c index 5c33f04693..f5fa836472 100644 --- a/libcli/security/privileges.c +++ b/libcli/security/privileges.c @@ -379,7 +379,7 @@ enum sec_privilege sec_privilege_from_index(int idx) if (idx >= 0 && idx<ARRAY_SIZE(privs)) { return privs[idx].luid; } - return -1; + return SEC_PRIV_INVALID; } /* |