if (argc != 0) {
cmd_error(CMD_PARSE_ERROR, err, "Garbage after end of command: `%s'.",
argv[0]);
- return (CMD_PARSE_ERROR);
+ return CMD_PARSE_ERROR;
}
- return (CMD_OK);
+ return CMD_OK;
} /* cmd_status_t cmd_parse_listval */
#define free_everything_and_return(status) \
} \
sfree(names); \
sfree(times); \
- return (status); \
+ return status; \
} while (0)
#define print_to_socket(fh, ...) \
do { \
if (fprintf(fh, __VA_ARGS__) < 0) { \
- char errbuf[1024]; \
WARNING("handle_listval: failed to write to socket #%i: %s", fileno(fh), \
- sstrerror(errno, errbuf, sizeof(errbuf))); \
+ STRERRNO); \
free_everything_and_return(CMD_ERROR); \
} \
fflush(fh); \
buffer);
if ((status = cmd_parse(buffer, &cmd, NULL, &err)) != CMD_OK)
- return (status);
+ return status;
if (cmd.type != CMD_LISTVAL) {
cmd_error(CMD_UNKNOWN_COMMAND, &err, "Unexpected command: `%s'.",
CMD_TO_STRING(cmd.type));
void cmd_destroy_listval(cmd_listval_t *listval __attribute__((unused))) {
/* nothing to do */
} /* void cmd_destroy_listval */
-
-/* vim: set sw=2 sts=2 ts=8 : */