From 29aced680a423e6d97cab4faaae81c3e77eb5fc3 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 6 Dec 2016 11:27:21 -0500 Subject: Remove error messages on xstrdup failure. xstrdup() prints a messages and exits, except in statd where is prints a message and fails. So there is no point printing an extra message when xstrdup() fails, and except in statd, no point calling exit() as well. So remove some pointless code. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson --- utils/statd/statd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'utils/statd/statd.c') diff --git a/utils/statd/statd.c b/utils/statd/statd.c index e5b4c98..15f2b18 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -332,11 +332,8 @@ int main (int argc, char **argv) exit(1); break; case 'H': /* PRC: specify the ha-callout program */ - if ((ha_callout_prog = xstrdup(optarg)) == NULL) { - fprintf(stderr, "%s: xstrdup(%s) failed!\n", - argv[0], optarg); + if ((ha_callout_prog = xstrdup(optarg)) == NULL) exit(1); - } break; case '?': /* heeeeeelllllllpppp? heh */ case 'h': -- cgit