diff options
author | Max Kellermann <max@duempel.org> | 2008-10-17 23:53:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-17 23:53:28 +0200 |
commit | 02a2a407c1d52c6635a551b7a64f1959781aba6d (patch) | |
tree | 6d1f796ee72162b8389b8dd6b3c0bc1aed542f55 /src/permission.c | |
parent | f8d5b7407160a2c9ec96026b7f7cbd2f4b40afdc (diff) | |
download | mpd-02a2a407c1d52c6635a551b7a64f1959781aba6d.tar.gz mpd-02a2a407c1d52c6635a551b7a64f1959781aba6d.tar.xz mpd-02a2a407c1d52c6635a551b7a64f1959781aba6d.zip |
client: converted permissions to unsigned
client->permission is a bit set, and should be unsigned.
Diffstat (limited to 'src/permission.c')
-rw-r--r-- | src/permission.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/permission.c b/src/permission.c index 4d53fa0cf..193d21f8a 100644 --- a/src/permission.c +++ b/src/permission.c @@ -34,11 +34,11 @@ static List *permission_passwords; -static int permission_default; +static unsigned permission_default; -static int parsePermissions(char *string) +static unsigned parsePermissions(char *string) { - int permission = 0; + unsigned permission = 0; char *temp; char *tok; @@ -70,7 +70,7 @@ void initPermissions(void) char *temp; char *cp2; char *password; - int *permission; + unsigned *permission; ConfigParam *param; permission_passwords = makeList(free, 1); @@ -99,7 +99,7 @@ void initPermissions(void) password = temp; - permission = xmalloc(sizeof(int)); + permission = xmalloc(sizeof(unsigned)); *permission = parsePermissions(strtok_r(NULL, "", &cp2)); @@ -116,12 +116,12 @@ void initPermissions(void) sortList(permission_passwords); } -int getPermissionFromPassword(char *password, int *permission) +int getPermissionFromPassword(char *password, unsigned *permission) { void *foundPermission; if (findInList(permission_passwords, password, &foundPermission)) { - *permission = *((int *)foundPermission); + *permission = *((unsigned *)foundPermission); return 0; } @@ -133,7 +133,7 @@ void finishPermissions(void) freeList(permission_passwords); } -int getDefaultPermissions(void) +unsigned getDefaultPermissions(void) { return permission_default; } |