command: use the bool datatype instead of int
Instead of returning 0 for success and -1 for failure, return true or false. This seems more natural.
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
#include "sllist.h"
|
||||
#include "ack.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
enum command_return {
|
||||
COMMAND_RETURN_ERROR = -1,
|
||||
COMMAND_RETURN_OK = 0,
|
||||
@@ -38,7 +40,7 @@ void command_finish(void);
|
||||
|
||||
enum command_return
|
||||
command_process_list(struct client *client,
|
||||
int list_ok, struct strnode *list);
|
||||
bool list_ok, struct strnode *list);
|
||||
|
||||
enum command_return
|
||||
command_process(struct client *client, char *commandString);
|
||||
|
Reference in New Issue
Block a user