diff --git a/src/server.c b/src/server.c index a1ada9c..2416870 100644 --- a/src/server.c +++ b/src/server.c @@ -373,7 +373,7 @@ int cmd_set_group(int sender_id, char* name) { } /* Function for CMD_SET_NAME */ -int cmd_set_name(int sender_id, char* name){ +int cmd_set_name(int sender_id, char* name) { char buf[BUF_LEN]; if ((clients[sender_id].id == -1) || (clients[sender_id].id != sender_id)) { @@ -384,7 +384,7 @@ int cmd_set_name(int sender_id, char* name){ fprintf(stderr, "WARNING: Received invalid name \"%s\"\n", name); return -1; } - if (get_client_id_from_name(name) < MAX_CLIENTS){ + if (get_client_id_from_name(name) < MAX_CLIENTS) { fprintf(stderr, "WARNING: Name \"%s\" is already used\n", name); sprintf(buf, "Name \"%s\" is already used !\n", name); cmd_send_message(SERVER_ID, sender_id, buf); @@ -401,7 +401,7 @@ int cmd_set_name(int sender_id, char* name){ } /* Function for CMD_GET_NAME */ -int cmd_get_name(int sender_id){ +int cmd_get_name(int sender_id) { char buf[BUF_LEN]; if ((clients[sender_id].id == -1) || (clients[sender_id].id != sender_id)) { @@ -605,7 +605,7 @@ void *Dispatcher(void *arg) { printf("cmd_send_message (from %d)\n", sender_id); /* Extract receiver_id */ - if ((token = strtok_r(rest, " ", &rest)) == NULL ) { + if ((token = strtok_r(rest, " ", &rest)) == NULL) { fprintf(stderr, "ERROR: strtok_r didn't return a token\n"); error_message = "WARNING: Syntax error: missing arguments\n"; cmd_send_message(SERVER_ID, sender_id, error_message);