aboutsummaryrefslogtreecommitdiffstats
path: root/src/permission.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2006-07-17 21:46:32 +0000
committerWarren Dukes <warren.dukes@gmail.com>2006-07-17 21:46:32 +0000
commit0bf396d610a78a16e49fe72f9ba4aa9a49a6053c (patch)
tree256510d9881995736292afa522a3c38b7d2aee20 /src/permission.c
parent7fdcd56a99f4c302d0e56c68e9c9db22d59b31b5 (diff)
downloadmpd-0bf396d610a78a16e49fe72f9ba4aa9a49a6053c.tar.gz
mpd-0bf396d610a78a16e49fe72f9ba4aa9a49a6053c.tar.xz
mpd-0bf396d610a78a16e49fe72f9ba4aa9a49a6053c.zip
some quick hacks to avoid signedness warnings with gcc4
git-svn-id: https://svn.musicpd.org/mpd/trunk@4387 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/permission.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/permission.c b/src/permission.c
index 6fa6441de..836ad3056 100644
--- a/src/permission.c
+++ b/src/permission.c
@@ -34,10 +34,10 @@
static List * permission_passwords;
-static unsigned int permission_default;
+static int permission_default;
-static unsigned int parsePermissions(char * string) {
- unsigned int permission = 0;
+static int parsePermissions(char * string) {
+ int permission = 0;
char * temp;
char * tok;
@@ -72,7 +72,7 @@ void initPermissions(void) {
char * temp;
char * cp2;
char * password;
- unsigned int * permission;
+ int * permission;
ConfigParam * param;
permission_passwords = makeList(free, 1);
@@ -104,7 +104,7 @@ void initPermissions(void) {
password = temp;
- permission = malloc(sizeof(unsigned int));
+ permission = malloc(sizeof(int));
*permission = parsePermissions(strtok_r(NULL,"",&cp2));
insertInList(permission_passwords,password,permission);
@@ -118,11 +118,11 @@ void initPermissions(void) {
sortList(permission_passwords);
}
-int getPermissionFromPassword(char * password, unsigned int * permission) {
+int getPermissionFromPassword(char * password, int * permission) {
void * foundPermission;
if(findInList(permission_passwords,password,&foundPermission)) {
- *permission = *((unsigned int *)foundPermission);
+ *permission = *((int *)foundPermission);
return 0;
}
@@ -133,6 +133,6 @@ void finishPermissions(void) {
freeList(permission_passwords);
}
-unsigned int getDefaultPermissions(void) {
+int getDefaultPermissions(void) {
return permission_default;
}