summaryrefslogtreecommitdiffstats
path: root/usr.sbin/autofs/common.c
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2015-03-09 15:31:33 +0000
committertrasz <trasz@FreeBSD.org>2015-03-09 15:31:33 +0000
commit155cef1fdba72ccea1c247ac82ca5af2273df8c8 (patch)
treedd7f3ccf56473236e00e338282b83e480da7902f /usr.sbin/autofs/common.c
parent9d17bb3d2b65cfa1102364e070aa1a4e7ad8e1e0 (diff)
downloadFreeBSD-src-155cef1fdba72ccea1c247ac82ca5af2273df8c8.zip
FreeBSD-src-155cef1fdba72ccea1c247ac82ca5af2273df8c8.tar.gz
Make things more readable; no functional changes.
MFC after: 1 month Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin/autofs/common.c')
-rw-r--r--usr.sbin/autofs/common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/autofs/common.c b/usr.sbin/autofs/common.c
index 395838d..51dd552 100644
--- a/usr.sbin/autofs/common.c
+++ b/usr.sbin/autofs/common.c
@@ -89,7 +89,7 @@ checked_strdup(const char *s)
* Concatenate two strings, inserting separator between them, unless not needed.
*/
char *
-separated_concat(const char *s1, const char *s2, char separator)
+concat(const char *s1, char separator, const char *s2)
{
char *result;
int ret;
@@ -135,7 +135,7 @@ create_directory(const char *path)
component = strsep(&copy, "/");
if (component == NULL)
break;
- tmp = separated_concat(partial, component, '/');
+ tmp = concat(partial, '/', component);
free(partial);
partial = tmp;
//log_debugx("creating \"%s\"", partial);
@@ -545,7 +545,7 @@ node_path_x(const struct node *n, char *x)
}
assert(n->n_key[0] != '\0');
- path = separated_concat(n->n_key, x, '/');
+ path = concat(n->n_key, '/', x);
free(x);
return (node_path_x(n->n_parent, path));
@@ -581,7 +581,7 @@ node_options_x(const struct node *n, char *x)
if (n == NULL)
return (x);
- options = separated_concat(x, n->n_options, ',');
+ options = concat(x, ',', n->n_options);
free(x);
return (node_options_x(n->n_parent, options));
OpenPOWER on IntegriCloud