about summary refs log tree commit diff
path: root/inet/ether_line.c
diff options
context:
space:
mode:
Diffstat (limited to 'inet/ether_line.c')
-rw-r--r--inet/ether_line.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/inet/ether_line.c b/inet/ether_line.c
index 889be0a4e9..0911499c13 100644
--- a/inet/ether_line.c
+++ b/inet/ether_line.c
@@ -62,9 +62,7 @@ ether_line (const char *line, struct ether_addr *addr, char *hostname)
     }
 
   /* Remove trailing white space.  */
-  cp = strchr (line, '#');
-  if (cp == NULL)
-    cp = strchr (line, '\0');
+  cp = __strchrnul (line, '#');
   while (cp > line && isspace (cp[-1]))
     --cp;
   *cp = '\0';