From 80dd76db7f927be1b6a967f43f36d705b701f153 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 15 Jun 2004 18:06:21 +0000 Subject: fix C99 stuff for commandError also some slight optimizations to interfacePrintWithFD() and myfprintf() git-svn-id: https://svn.musicpd.org/mpd/trunk@1503 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/directory.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/directory.c') diff --git a/src/directory.c b/src/directory.c index 0d1b0ee2b..a05553dd6 100644 --- a/src/directory.c +++ b/src/directory.c @@ -166,7 +166,8 @@ void readDirectoryDBIfUpdateIsFinished() { int updateInit(FILE * fp, List * pathList) { if(directory_updatePid > 0) { - commandError(fp, ACK_ERROR_UPDATE_ALREADY, "already updating"); + commandError(fp, ACK_ERROR_UPDATE_ALREADY, "already updating", + NULL); return -1; } @@ -224,7 +225,7 @@ int updateInit(FILE * fp, List * pathList) { unblockSignals(); ERROR("updateInit: Problems forking()'ing\n"); commandError(fp, ACK_ERROR_SYSTEM, - "problems trying to update"); + "problems trying to update", NULL); directory_updatePid = 0; return -1; } @@ -745,7 +746,8 @@ int printDirectoryInfo(FILE * fp, char * name) { Directory * directory; if((directory = getDirectory(name))==NULL) { - commandError(fp, ACK_ERROR_NO_EXIST, "directory not found"); + commandError(fp, ACK_ERROR_NO_EXIST, "directory not found", + NULL); return -1; } @@ -1047,7 +1049,7 @@ int traverseAllIn(FILE * fp, char * name, return forEachSong(fp, song, data); } commandError(fp, ACK_ERROR_NO_EXIST, - "directory or file not found"); + "directory or file not found", NULL); return -1; } @@ -1129,7 +1131,7 @@ int searchForSongsIn(FILE * fp, char * name, char * item, char * string) { ret = traverseAllIn(fp,name,searchForFilenameInDirectory,NULL, (void *)dup); } - else commandError(fp, ACK_ERROR_ARG, "unknown table"); + else commandError(fp, ACK_ERROR_ARG, "unknown table", NULL); free(dup); @@ -1166,7 +1168,7 @@ int findSongsIn(FILE * fp, char * name, char * item, char * string) { (void *)string); } - commandError(fp, ACK_ERROR_ARG, "unknown table"); + commandError(fp, ACK_ERROR_ARG, "unknown table", NULL); return -1; } -- cgit v1.2.3