Parcourir la source

Rename type as flags for consistency between functions

Stéphane Raimbault il y a 6 ans
Parent
commit
6c14b7fc22
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      src/modbus-tcp.c

+ 4 - 4
src/modbus-tcp.c

@@ -481,7 +481,7 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
 {
     int new_s;
     int enable;
-    int type;
+    int flags;
     struct sockaddr_in addr;
     modbus_tcp_t *ctx_tcp;
 
@@ -498,13 +498,13 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
     }
 #endif
 
-    type = SOCK_STREAM;
+    flags = SOCK_STREAM;
 
 #ifdef SOCK_CLOEXEC
-    type |= SOCK_CLOEXEC;
+    flags |= SOCK_CLOEXEC;
 #endif
 
-    new_s = socket(PF_INET, type, IPPROTO_TCP);
+    new_s = socket(PF_INET, flags, IPPROTO_TCP);
     if (new_s == -1) {
         return -1;
     }