diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-04-02 23:34:16 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-04-02 23:34:16 +0000 |
commit | 785cdb0114f8cf534ef93e413e49fbfb62521a67 (patch) | |
tree | 8b464779ba774c20eb7dfb29ac5f9544c652a374 /src/conf.c | |
parent | 4f912f1b905f54d8e238559430511f9d4aae7c5a (diff) | |
download | mpd-785cdb0114f8cf534ef93e413e49fbfb62521a67.tar.gz mpd-785cdb0114f8cf534ef93e413e49fbfb62521a67.tar.xz mpd-785cdb0114f8cf534ef93e413e49fbfb62521a67.zip |
use EXIT_SUCCESS and EXIT_FAILURE
git-svn-id: https://svn.musicpd.org/mpd/trunk@591 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/conf.c')
-rw-r--r-- | src/conf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/conf.c b/src/conf.c index ce7e8a123..c79156e4f 100644 --- a/src/conf.c +++ b/src/conf.c @@ -160,7 +160,7 @@ char ** readConf(char * file) { if(!(fp=fopen(file,"r"))) { ERROR("problems opening file %s for reading\n",file); - exit(-1); + exit(EXIT_FAILURE); } while(myFgets(string,sizeof(string),fp)) { @@ -169,13 +169,13 @@ char ** readConf(char * file) { if(numberOfArgs==0) continue; if(2!=numberOfArgs) { ERROR("improperly formated config line: %s\n",string); - exit(-1); + exit(EXIT_FAILURE); } i = 0; while(i<CONF_NUMBER_OF_PARAMS && 0!=strcmp(conf_strings[i],array[0])) i++; if(i>=CONF_NUMBER_OF_PARAMS) { ERROR("unrecognized line in conf: %s\n",string); - exit(-1); + exit(EXIT_FAILURE); } if(conf_params[i]!=NULL) { if(allowCat[i]) { @@ -203,7 +203,7 @@ char ** readConf(char * file) { if(conf_params[conf_required[i]] == NULL) { ERROR("%s is unassigned in conf file\n", conf_strings[conf_required[i]]); - exit(-1); + exit(EXIT_FAILURE); } } @@ -214,7 +214,7 @@ char ** readConf(char * file) { { ERROR("\"%s\" is not an absolute path\n", conf_params[conf_absolutePaths[i]]); - exit(-1); + exit(EXIT_FAILURE); } /* Parse ~ in path */ else if(conf_params[conf_absolutePaths[i]] && @@ -230,7 +230,7 @@ char ** readConf(char * file) { if((pwd = getpwuid(uid)) == NULL) { ERROR("problems getting passwd entry " "for current user\n"); - exit(-1); + exit(EXIT_FAILURE); } } else { @@ -249,7 +249,7 @@ char ** readConf(char * file) { ERROR("user \"%s\" not found\n", &(conf_params[ conf_absolutePaths[i]][1])); - exit(-1); + exit(EXIT_FAILURE); } if(foundSlash) *ch = '/'; } |