aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/autofs/automount.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2015-03-12 12:17:15 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2015-03-12 12:17:15 +0000
commit4d58da13af0292880f5f1fb7fbf89bcbf6eb5ab9 (patch)
tree818ff5360d14192ee02273df37566233dd759287 /usr.sbin/autofs/automount.c
parent5c16a48aecfe192658bb1868e9fc1a29ca470a8c (diff)
downloadsrc-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/automount.c')
-rw-r--r--usr.sbin/autofs/automount.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c
index 8a7c91a59b21..8bcc79b13528 100644
--- a/usr.sbin/autofs/automount.c
+++ b/usr.sbin/autofs/automount.c
@@ -345,11 +345,7 @@ main_automount(int argc, char **argv)
force_unmount = true;
break;
case 'o':
- if (options == NULL) {
- options = checked_strdup(optarg);
- } else {
- options = concat(options, ',', optarg);
- }
+ options = concat(options, ',', optarg);
break;
case 'u':
do_unmount = true;
@@ -385,9 +381,7 @@ main_automount(int argc, char **argv)
parse_master(root, AUTO_MASTER_PATH);
if (show_maps) {
- if (options != NULL) {
- root->n_options = concat(options, ',', root->n_options);
- }
+ root->n_options = concat(options, ',', root->n_options);
if (show_maps > 1) {
node_expand_indirect_maps(root);
node_expand_ampersand(root, NULL);