summaryrefslogtreecommitdiff
path: root/usr.sbin/mrouted
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2003-07-13 12:40:17 +0000
committeritojun <itojun@NetBSD.org>2003-07-13 12:40:17 +0000
commitb98c10dfbbe383d186114bd44d414dc2e60bbbb4 (patch)
treec0f0b11f9979ca1cb82220137236332debb01cd6 /usr.sbin/mrouted
parent9e765fb45101df7e764d63d4313aa747cc2c456a (diff)
strdup is simpler
Diffstat (limited to 'usr.sbin/mrouted')
-rw-r--r--usr.sbin/mrouted/cfparse.y5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/mrouted/cfparse.y b/usr.sbin/mrouted/cfparse.y
index e62924f6135..664a00bb18b 100644
--- a/usr.sbin/mrouted/cfparse.y
+++ b/usr.sbin/mrouted/cfparse.y
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cfparse.y,v 1.13 2003/05/16 22:59:50 dsl Exp $ */
+/* $NetBSD: cfparse.y,v 1.14 2003/07/13 12:40:17 itojun Exp $ */
/*
* Configuration file parser for mrouted.
@@ -206,8 +206,7 @@ stmt : error
fatal("Too many named boundaries (max %d)", MAXBOUNDS);
}
- boundlist[numbounds].name = malloc(strlen($2) + 1);
- strcpy(boundlist[numbounds].name, $2);
+ boundlist[numbounds].name = strdup($2);
boundlist[numbounds++].bound = $3;
}
| SYSNAM STRING {