summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ifstated
diff options
context:
space:
mode:
authorrob <rob@openbsd.org>2017-08-21 17:38:55 +0000
committerrob <rob@openbsd.org>2017-08-21 17:38:55 +0000
commit743e2441d61344bad534cf5686ff14e1d2d57fb6 (patch)
tree27fab9483c5b46d10e4d3a5bbcef1c10fef74085 /usr.sbin/ifstated
parentWhen executing ssh, use "--" to indicate end of arguments before the (diff)
downloadwireguard-openbsd-743e2441d61344bad534cf5686ff14e1d2d57fb6.tar.xz
wireguard-openbsd-743e2441d61344bad534cf5686ff14e1d2d57fb6.zip
Remove unnecessary NULL check and fix an incorrect warning.
Ok jca@
Diffstat (limited to 'usr.sbin/ifstated')
-rw-r--r--usr.sbin/ifstated/parse.y6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y
index 0d8a1222333..ba186448f32 100644
--- a/usr.sbin/ifstated/parse.y
+++ b/usr.sbin/ifstated/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.46 2017/08/20 17:49:29 rob Exp $ */
+/* $OpenBSD: parse.y,v 1.47 2017/08/21 17:38:55 rob Exp $ */
/*
* Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
@@ -192,8 +192,6 @@ action : RUN STRING {
err(1, "action: calloc");
action->type = IFSD_ACTION_COMMAND;
action->act.command = $2;
- if (action->act.command == NULL)
- err(1, "action: strdup");
TAILQ_INSERT_TAIL(&curaction->act.c.actions,
action, entries);
}
@@ -686,7 +684,7 @@ pushfile(const char *name, int secret)
return (NULL);
}
if ((nfile->name = strdup(name)) == NULL) {
- warn("malloc");
+ warn("strdup");
free(nfile);
return (NULL);
}