socket-util: inet_parse_passive() had incorrect argument type.
authorEthan Jackson <ethan@nicira.com>
Tue, 13 Sep 2011 20:28:49 +0000 (13:28 -0700)
committerEthan Jackson <ethan@nicira.com>
Tue, 13 Sep 2011 21:29:41 +0000 (14:29 -0700)
This patch fixes the following compiler warning:

lib/socket-util.c:621:5: error: comparison is always false due to
limited range of data type [-Werror=type-limits]

lib/socket-util.c
lib/socket-util.h

index 2d554ac1812a70ef0927eea19533ab31b9b48ca3..65b57caf9c66cb21e8ab757a3ca4fe7bc8a101f6 100644 (file)
@@ -598,7 +598,7 @@ exit:
  * If successful, stores the address into '*sinp' and returns true; otherwise
  * zeros '*sinp' and returns false. */
 bool
-inet_parse_passive(const char *target_, uint16_t default_port,
+inet_parse_passive(const char *target_, int default_port,
                    struct sockaddr_in *sinp)
 {
     char *target = xstrdup(target_);
index ce7cd5ba414d9c6a4f076ba29f374cf38669fad1..0376006f3f7cf041c05825cd65d43221a7899c18 100644 (file)
@@ -45,7 +45,7 @@ bool inet_parse_active(const char *target, uint16_t default_port,
 int inet_open_active(int style, const char *target, uint16_t default_port,
                     struct sockaddr_in *sinp, int *fdp);
 
-bool inet_parse_passive(const char *target, uint16_t default_port,
+bool inet_parse_passive(const char *target, int default_port,
                         struct sockaddr_in *sinp);
 int inet_open_passive(int style, const char *target, int default_port,
                       struct sockaddr_in *sinp);