summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_socket.c
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2001-06-25 19:55:02 +0000
committerjdolecek <jdolecek@NetBSD.org>2001-06-25 19:55:02 +0000
commit1b8747385114115d98f369083b0d88fc43f5cfad (patch)
tree644e7f01a51ecb13ba41f10fd634a7792ebfdbbf /sys/compat/linux/common/linux_socket.c
parentd865180393eead35594f5bfd6ecc68d222e3e8a9 (diff)
linux_getifhwaddr(): use strncmp() to find out if if_name starts with 'eth',
it's more readable that way
Diffstat (limited to 'sys/compat/linux/common/linux_socket.c')
-rw-r--r--sys/compat/linux/common/linux_socket.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c
index 6badf01157a..7b8d385b15d 100644
--- a/sys/compat/linux/common/linux_socket.c
+++ b/sys/compat/linux/common/linux_socket.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.30 2001/06/14 20:32:43 thorpej Exp $ */
+/* $NetBSD: linux_socket.c,v 1.31 2001/06/25 19:55:02 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -527,9 +527,7 @@ linux_getifhwaddr(p, retval, fd, data)
}
}
- if (lreq.if_name[0] == 'e' &&
- lreq.if_name[1] == 't' &&
- lreq.if_name[2] == 'h') {
+ if (strncmp(lreq.if_name, "eth", 3) == 0) {
for (ifnum = 0, index = 3;
lreq.if_name[index] != '\0' && index < IF_NAME_LEN;
index++) {