diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2015-03-12 12:17:15 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2015-03-12 12:17:15 +0000 |
commit | 4d58da13af0292880f5f1fb7fbf89bcbf6eb5ab9 (patch) | |
tree | 818ff5360d14192ee02273df37566233dd759287 /usr.sbin/autofs/automountd.c | |
parent | 5c16a48aecfe192658bb1868e9fc1a29ca470a8c (diff) | |
download | src-4d58da13af0292880f5f1fb7fbf89bcbf6eb5ab9.tar.gz src-4d58da13af0292880f5f1fb7fbf89bcbf6eb5ab9.zip |
Make concat() accept NULL arguments.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=279915
Diffstat (limited to 'usr.sbin/autofs/automountd.c')
-rw-r--r-- | usr.sbin/autofs/automountd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/autofs/automountd.c b/usr.sbin/autofs/automountd.c index 191e71240651..9c399fd626ea 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++; |