summaryrefslogtreecommitdiffstats
path: root/usr.sbin/autofs/automountd.c
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2015-05-21 13:36:00 +0000
committertrasz <trasz@FreeBSD.org>2015-05-21 13:36:00 +0000
commitffdd97ce45793ac2206ca85895ccf346c9fc4bbc (patch)
treebd77ca1f16bd60a80db7fc290174aaa002232efb /usr.sbin/autofs/automountd.c
parent5d932fec110b4522fa6e6bc7cfcb90cf0a8cff4b (diff)
downloadFreeBSD-src-ffdd97ce45793ac2206ca85895ccf346c9fc4bbc.zip
FreeBSD-src-ffdd97ce45793ac2206ca85895ccf346c9fc4bbc.tar.gz
MFC r279915:
Make concat() accept NULL arguments. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin/autofs/automountd.c')
-rw-r--r--usr.sbin/autofs/automountd.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/autofs/automountd.c b/usr.sbin/autofs/automountd.c
index 191e712..9c399fd 100644
--- a/usr.sbin/autofs/automountd.c
+++ b/usr.sbin/autofs/automountd.c
@@ -241,8 +241,7 @@ handle_request(const struct autofs_daemon_request *adr, char *cmdline_options,
/*
* Prepend options passed via automountd(8) command line.
*/
- if (cmdline_options != NULL)
- options = concat(cmdline_options, ',', options);
+ options = concat(cmdline_options, ',', options);
if (node->n_location == NULL) {
log_debugx("found node defined at %s:%d; not a mountpoint",
@@ -455,11 +454,7 @@ main_automountd(int argc, char **argv)
maxproc = atoi(optarg);
break;
case 'o':
- if (options == NULL) {
- options = checked_strdup(optarg);
- } else {
- options = concat(options, ',', optarg);
- }
+ options = concat(options, ',', optarg);
break;
case 'v':
debug++;
OpenPOWER on IntegriCloud