From 743e2441d61344bad534cf5686ff14e1d2d57fb6 Mon Sep 17 00:00:00 2001 From: rob Date: Mon, 21 Aug 2017 17:38:55 +0000 Subject: Remove unnecessary NULL check and fix an incorrect warning. Ok jca@ --- usr.sbin/ifstated/parse.y | 6 ++---- 1 file 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 @@ -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); } -- cgit v1.2.3-59-g8ed1b