aboutsummaryrefslogtreecommitdiffstats
path: root/src/permission.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/permission.c')
-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;
}