diff --git a/src/client.c b/src/client.c index f5e427b..9ec782b 100644 --- a/src/client.c +++ b/src/client.c @@ -28,11 +28,11 @@ int main(int argc, char *argv[]) { /* Initialize default values for the socket */ client_socket.sin_family = AF_INET; -#ifdef PORT + #ifdef PORT client_socket.sin_port = htons(PORT); -#else + #else client_socket.sin_port = 0; -#endif + #endif /* Get server address */ if ((host = gethostbyname(argv[1])) == NULL) { fprintf(stderr, "gethostbyname: error %d\n", h_errno); diff --git a/src/server.c b/src/server.c index fc3cd66..b22a880 100644 --- a/src/server.c +++ b/src/server.c @@ -25,11 +25,11 @@ int main(void) { /* Initialisation des valeurs par défaut du socket */ server_socket.sin_family = AF_INET; -#ifdef PORT + #ifdef PORT server_socket.sin_port = htons(PORT); // port dans l'ordre des octets réseau -#else + #else server_socket.sin_port = 0; -#endif + #endif server_socket.sin_addr.s_addr = makeip4(0, 0, 0, 0); // server_socket.sin_addr.s_addr = htonl(INADDR_LOOPBACK);