commandError() cleanups, fixup gcc checks
stripped binary size reduced by 9k on my machine from making commandError a function. We'll print out error messages slightly slower before, but the smaller binary is more than worth it. git-svn-id: https://svn.musicpd.org/mpd/trunk@4488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -48,18 +48,6 @@ void finishCommands();
|
||||
|
||||
#define commandSuccess(fd) fdprintf(fd, "OK\n")
|
||||
|
||||
#define commandError(fd, error, format, ... ) do \
|
||||
{\
|
||||
if (current_command) { \
|
||||
fdprintf(fd, "ACK [%i@%i] {%s} " format "\n", \
|
||||
(int)error, command_listNum, \
|
||||
current_command, __VA_ARGS__); \
|
||||
current_command = NULL; \
|
||||
} \
|
||||
else { \
|
||||
fdprintf(STDERR_FILENO, "ACK [%i@%i] " format "\n", \
|
||||
(int)error, command_listNum, \
|
||||
__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
mpd_fprintf_ void commandError(int fd, int error, const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user