diff options
author | Avuton Olrich <avuton@gmail.com> | 2006-07-14 20:14:06 +0000 |
---|---|---|
committer | Avuton Olrich <avuton@gmail.com> | 2006-07-14 20:14:06 +0000 |
commit | 06a008570062a9e2d640ee4a100aca905bdb22fc (patch) | |
tree | 40f1f9e48f5d863faf6091ab0b7027a82c2a4ea0 /src | |
parent | a8938c91ba2f65ad9c1c33b2d8a6ee252ff6974a (diff) | |
download | mpd-06a008570062a9e2d640ee4a100aca905bdb22fc.tar.gz mpd-06a008570062a9e2d640ee4a100aca905bdb22fc.tar.xz mpd-06a008570062a9e2d640ee4a100aca905bdb22fc.zip |
[CLEANUP] Cleanup whitespace->tabs
Static where it makes sense
git-svn-id: https://svn.musicpd.org/mpd/trunk@4339 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/permission.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/permission.c b/src/permission.c index 3b6f7d142..688959816 100644 --- a/src/permission.c +++ b/src/permission.c @@ -32,11 +32,11 @@ #define PERMISSION_CONTROL_STRING "control" #define PERMISSION_ADMIN_STRING "admin" -List * permission_passwords; +static List * permission_passwords; -unsigned int permission_default; +static unsigned int permission_default; -unsigned int parsePermissions(char * string) { +static unsigned int parsePermissions(char * string) { unsigned int permission = 0; char * temp; char * tok; @@ -73,45 +73,45 @@ void initPermissions() { char * cp2; char * password; unsigned int * permission; - ConfigParam * param; + ConfigParam * param; permission_passwords = makeList(free, 1); permission_default = PERMISSION_READ | PERMISSION_ADD | PERMISSION_CONTROL | PERMISSION_ADMIN; - param = getNextConfigParam(CONF_PASSWORD, NULL); + param = getNextConfigParam(CONF_PASSWORD, NULL); - if(param) { + if(param) { permission_default = 0; - do { - if(!strstr(param->value, PERMISSION_PASSWORD_CHAR)) { - ERROR("\"%s\" not found in password string " - "\"%s\", line %i\n", + do { + if(!strstr(param->value, PERMISSION_PASSWORD_CHAR)) { + ERROR("\"%s\" not found in password string " + "\"%s\", line %i\n", PERMISSION_PASSWORD_CHAR, param->value, - param->line); - exit(EXIT_FAILURE); - } + param->line); + exit(EXIT_FAILURE); + } - if(!(temp = strtok_r(param->value, - PERMISSION_PASSWORD_CHAR,&cp2))) { - ERROR("something weird just happened in permission.c\n"); - exit(EXIT_FAILURE); - } + if(!(temp = strtok_r(param->value, + PERMISSION_PASSWORD_CHAR,&cp2))) { + ERROR("something weird just happened in permission.c\n"); + exit(EXIT_FAILURE); + } - - password = temp; - permission = malloc(sizeof(unsigned int)); - *permission = parsePermissions(strtok_r(NULL,"",&cp2)); + password = temp; - insertInList(permission_passwords,password,permission); - } while((param = getNextConfigParam(CONF_PASSWORD, param))); + permission = malloc(sizeof(unsigned int)); + *permission = parsePermissions(strtok_r(NULL,"",&cp2)); + + insertInList(permission_passwords,password,permission); + } while((param = getNextConfigParam(CONF_PASSWORD, param))); } - param = getConfigParam(CONF_DEFAULT_PERMS); + param = getConfigParam(CONF_DEFAULT_PERMS); if(param) permission_default = parsePermissions(param->value); |