Indent preprocessor directives, it's not 1970 anymore

This commit is contained in:
flyingscorpio@clevo 2022-10-19 22:28:10 +02:00
parent a0368d403b
commit c378f71ced
2 changed files with 6 additions and 6 deletions

View file

@ -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);

View file

@ -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);