diff options
| author | NeilBrown <neilb@suse.com> | 2016-12-06 11:27:21 -0500 |
|---|---|---|
| committer | Steve Dickson <steved@redhat.com> | 2016-12-06 11:27:21 -0500 |
| commit | 29aced680a423e6d97cab4faaae81c3e77eb5fc3 (patch) | |
| tree | 4ec845d0a536302f9a94a88e1bb421d97d181814 /utils/mountd | |
| parent | fc1127d754578cd1dc3b52aebce1d5ae09f2d347 (diff) | |
| download | nfs-utils-29aced680a423e6d97cab4faaae81c3e77eb5fc3.tar.gz nfs-utils-29aced680a423e6d97cab4faaae81c3e77eb5fc3.tar.xz nfs-utils-29aced680a423e6d97cab4faaae81c3e77eb5fc3.zip | |
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 <neilb@suse.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mountd')
| -rw-r--r-- | utils/mountd/mountd.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index a0ab293..d6cebbb 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -721,11 +721,7 @@ main(int argc, char **argv) reverse_resolve = 1; break; case 's': - if ((state_dir = xstrdup(optarg)) == NULL) { - fprintf(stderr, "%s: xstrdup(%s) failed!\n", - progname, optarg); - exit(1); - } + state_dir = xstrdup(optarg); break; case 't': num_threads = atoi (optarg); |
