diff options
author | trasz <trasz@FreeBSD.org> | 2015-05-21 13:36:00 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2015-05-21 13:36:00 +0000 |
commit | ffdd97ce45793ac2206ca85895ccf346c9fc4bbc (patch) | |
tree | bd77ca1f16bd60a80db7fc290174aaa002232efb /usr.sbin/autofs/automount.c | |
parent | 5d932fec110b4522fa6e6bc7cfcb90cf0a8cff4b (diff) | |
download | FreeBSD-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/automount.c')
-rw-r--r-- | usr.sbin/autofs/automount.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c index 8a7c91a..8bcc79b 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); |