aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-15 18:06:21 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-15 18:06:21 +0000
commit80dd76db7f927be1b6a967f43f36d705b701f153 (patch)
tree8d95e5e8eaaa92c3e581b1c991c0f82cdb33d435 /src/command.c
parent28d6bb796a0cf53c8d53e0de78e00e1fedcbf02d (diff)
downloadmpd-80dd76db7f927be1b6a967f43f36d705b701f153.tar.gz
mpd-80dd76db7f927be1b6a967f43f36d705b701f153.tar.xz
mpd-80dd76db7f927be1b6a967f43f36d705b701f153.zip
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
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/command.c b/src/command.c
index 81398ebaf..03899cb17 100644
--- a/src/command.c
+++ b/src/command.c
@@ -164,7 +164,7 @@ int handlePlay(FILE * fp, unsigned int * permission, int argArrayLength,
song = strtol(argArray[1],&test,10);
if(*test!='\0') {
commandError(fp, ACK_ERROR_ARG,
- "need a positive integer");
+ "need a positive integer", NULL);
return -1;
}
}
@@ -181,7 +181,7 @@ int handlePlayId(FILE * fp, unsigned int * permission, int argArrayLength,
id = strtol(argArray[1],&test,10);
if(*test!='\0') {
commandError(fp, ACK_ERROR_ARG,
- "need a positive integer");
+ "need a positive integer", NULL);
return -1;
}
}
@@ -309,7 +309,7 @@ int handleDelete(FILE * fp, unsigned int * permission, int argArrayLength,
song = strtol(argArray[1],&test,10);
if(*test!='\0') {
commandError(fp, ACK_ERROR_ARG,
- "need a positive integer");
+ "need a positive integer", NULL);
return -1;
}
return deleteFromPlaylist(fp,song);
@@ -324,7 +324,7 @@ int handleDeleteId(FILE * fp, unsigned int * permission, int argArrayLength,
id = strtol(argArray[1],&test,10);
if(*test!='\0') {
commandError(fp, ACK_ERROR_ARG,
- "need a positive integer");
+ "need a positive integer", NULL);
return -1;
}
return deleteFromPlaylistById(fp, id);
@@ -387,7 +387,8 @@ int handlePlaylistChanges(FILE * fp, unsigned int * permission,
version = strtoul(argArray[1], &test, 10);
if(*test!='\0') {
- commandError(fp, ACK_ERROR_ARG, "need a positive integer");
+ commandError(fp, ACK_ERROR_ARG, "need a positive integer",
+ NULL);
return -1;
}
return playlistChanges(fp, version);
@@ -403,7 +404,7 @@ int handlePlaylistInfo(FILE * fp, unsigned int * permission,
song = strtol(argArray[1],&test,10);
if(*test!='\0') {
commandError(fp, ACK_ERROR_ARG,
- "%s need a positive integer");
+ "need a positive integer", NULL);
return -1;
}
}
@@ -420,7 +421,7 @@ int handlePlaylistId(FILE * fp, unsigned int * permission,
id = strtol(argArray[1],&test,10);
if(*test!='\0') {
commandError(fp, ACK_ERROR_ARG,
- "%s need a positive integer");
+ "need a positive integer", NULL);
return -1;
}
}
@@ -509,7 +510,7 @@ int handleVolume(FILE * fp, unsigned int * permission, int argArrayLength,
change = strtol(argArray[1],&test,10);
if(*test!='\0') {
- commandError(fp, ACK_ERROR_ARG, "need an integer");
+ commandError(fp, ACK_ERROR_ARG, "need an integer", NULL);
return -1;
}
return changeVolumeLevel(fp,change,1);
@@ -523,7 +524,7 @@ int handleSetVol(FILE * fp, unsigned int * permission, int argArrayLength,
level = strtol(argArray[1],&test,10);
if(*test!='\0') {
- commandError(fp, ACK_ERROR_ARG, "need an integer");
+ commandError(fp, ACK_ERROR_ARG, "need an integer", NULL);
return -1;
}
return changeVolumeLevel(fp,level,0);
@@ -537,7 +538,7 @@ int handleRepeat(FILE * fp, unsigned int * permission, int argArrayLength,
status = strtol(argArray[1],&test,10);
if(*test!='\0') {
- commandError(fp, ACK_ERROR_ARG, "need an integer");
+ commandError(fp, ACK_ERROR_ARG, "need an integer", NULL);
return -1;
}
return setPlaylistRepeatStatus(fp,status);
@@ -551,7 +552,7 @@ int handleRandom(FILE * fp, unsigned int * permission, int argArrayLength,
status = strtol(argArray[1],&test,10);
if(*test!='\0') {
- commandError(fp, ACK_ERROR_ARG, "need an integer");
+ commandError(fp, ACK_ERROR_ARG, "need an integer", NULL);
return -1;
}
return setPlaylistRandomStatus(fp,status);
@@ -730,7 +731,7 @@ int handlePassword(FILE * fp, unsigned int * permission, int argArrayLength,
char ** argArray)
{
if(getPermissionFromPassword(argArray[1],permission)<0) {
- commandError(fp, ACK_ERROR_PASSWORD, "incorrect password");
+ commandError(fp, ACK_ERROR_PASSWORD, "incorrect password", NULL);
return -1;
}