Commit 6c14b7fc22724204ade1e122ffddea03b8df68fb

Authored by Stéphane Raimbault
1 parent bba1b812

Rename type as flags for consistency between functions

Showing 1 changed file with 4 additions and 4 deletions
src/modbus-tcp.c
@@ -481,7 +481,7 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection) @@ -481,7 +481,7 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
481 { 481 {
482 int new_s; 482 int new_s;
483 int enable; 483 int enable;
484 - int type; 484 + int flags;
485 struct sockaddr_in addr; 485 struct sockaddr_in addr;
486 modbus_tcp_t *ctx_tcp; 486 modbus_tcp_t *ctx_tcp;
487 487
@@ -498,13 +498,13 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection) @@ -498,13 +498,13 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
498 } 498 }
499 #endif 499 #endif
500 500
501 - type = SOCK_STREAM; 501 + flags = SOCK_STREAM;
502 502
503 #ifdef SOCK_CLOEXEC 503 #ifdef SOCK_CLOEXEC
504 - type |= SOCK_CLOEXEC; 504 + flags |= SOCK_CLOEXEC;
505 #endif 505 #endif
506 506
507 - new_s = socket(PF_INET, type, IPPROTO_TCP); 507 + new_s = socket(PF_INET, flags, IPPROTO_TCP);
508 if (new_s == -1) { 508 if (new_s == -1) {
509 return -1; 509 return -1;
510 } 510 }