aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io.c b/io.c
index 9d1d06a8..8a6c718e 100644
--- a/io.c
+++ b/io.c
@@ -3973,7 +3973,7 @@ inetfile(const char *str, size_t len, struct inet_socket_info *isi)
struct inet_socket_info buf;
/* syntax: /inet/protocol/localport/hostname/remoteport */
- if (len < 5 || strncmp(cp, "/inet", 5) != 0)
+ if (len < 5 || memcmp(cp, "/inet", 5) != 0)
/* quick exit */
return false;
if (! isi)
@@ -4003,9 +4003,9 @@ inetfile(const char *str, size_t len, struct inet_socket_info *isi)
/* which protocol? */
if (cpend - cp < 5)
return false;
- if (strncmp(cp, "tcp/", 4) == 0)
+ if (memcmp(cp, "tcp/", 4) == 0)
isi->protocol = SOCK_STREAM;
- else if (strncmp(cp, "udp/", 4) == 0)
+ else if (memcmp(cp, "udp/", 4) == 0)
isi->protocol = SOCK_DGRAM;
else
return false;