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/directory.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 '')
-rw-r--r-- | src/directory.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/directory.c b/src/directory.c index 2d672afce..3da1a0517 100644 --- a/src/directory.c +++ b/src/directory.c @@ -444,21 +444,21 @@ void readDirectoryInfo(FILE * fp,Directory * directory) { key = strdup(&(buffer[strlen(DIRECTORY_DIR)])); if(myFgets(buffer,bufferSize,fp)<0) { ERROR("Error reading db\n"); - exit(-1); + exit(EXIT_FAILURE); } if(strncmp(DIRECTORY_MTIME,buffer,strlen(DIRECTORY_MTIME))) { ERROR("Error reading db\n"); ERROR("%s\n",buffer); - exit(-1); + exit(EXIT_FAILURE); } mtime = atoi(&(buffer[strlen(DIRECTORY_BEGIN)])); if(myFgets(buffer,bufferSize,fp)<0) { ERROR("Error reading db\n"); - exit(-1); + exit(EXIT_FAILURE); } if(strncmp(DIRECTORY_BEGIN,buffer,strlen(DIRECTORY_BEGIN))) { ERROR("Error reading db\n"); - exit(-1); + exit(EXIT_FAILURE); } name = strdup(&(buffer[strlen(DIRECTORY_BEGIN)])); subDirectory = newDirectory(directory,name,mtime); @@ -472,7 +472,7 @@ void readDirectoryInfo(FILE * fp,Directory * directory) { } else { ERROR("Unknown line in db: %s\n",buffer); - exit(-1); + exit(EXIT_FAILURE); } } } @@ -529,7 +529,7 @@ int readDirectoryDB() { if(myFgets(buffer,bufferSize,fp)<0) { ERROR("Error reading db\n"); - exit(-1); + exit(EXIT_FAILURE); } if(0==strcmp(DIRECTORY_INFO_BEGIN,buffer)) { while(myFgets(buffer,bufferSize,fp) && @@ -541,7 +541,7 @@ int readDirectoryDB() { if(foundVersion) { ERROR("already found " "version in db\n"); - exit(-1); + exit(EXIT_FAILURE); } foundVersion = 1; } @@ -554,7 +554,7 @@ int readDirectoryDB() { if(foundFsCharset) { ERROR("already found " "fs charset in db\n"); - exit(-1); + exit(EXIT_FAILURE); } foundFsCharset = 1; @@ -577,7 +577,7 @@ int readDirectoryDB() { else { ERROR("directory: unknown line in db info: %s\n", buffer); - exit(-1); + exit(EXIT_FAILURE); } } } |