summaryrefslogtreecommitdiffstats
path: root/lib/libedit/filecomplete.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-01-30 12:22:20 +0000
committerschwarze <schwarze@openbsd.org>2016-01-30 12:22:20 +0000
commit28d54ee83c6affd52032b6242140cc317714b94c (patch)
tree0ef5cda3e75bd5bab700bd54a1d43f60de5abb7b /lib/libedit/filecomplete.c
parentExplain how to run multiple copies of the same daemon; (diff)
downloadwireguard-openbsd-28d54ee83c6affd52032b6242140cc317714b94c.tar.xz
wireguard-openbsd-28d54ee83c6affd52032b6242140cc317714b94c.zip
Fourth step in synching with NetBSD:
KNF: Remove parentheses from return lines. No object change. This makes emacs.c and prompt.c identical to the NetBSD versions. It reduces the remaining diff from +2053 -1261 to +1526 -734. OK czarkoff@
Diffstat (limited to 'lib/libedit/filecomplete.c')
-rw-r--r--lib/libedit/filecomplete.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libedit/filecomplete.c b/lib/libedit/filecomplete.c
index c6c2000fed6..a83699d5e03 100644
--- a/lib/libedit/filecomplete.c
+++ b/lib/libedit/filecomplete.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: filecomplete.c,v 1.5 2016/01/30 00:06:39 schwarze Exp $ */
+/* $OpenBSD: filecomplete.c,v 1.6 2016/01/30 12:22:20 schwarze Exp $ */
/* $NetBSD: filecomplete.c,v 1.22 2010/12/02 04:42:46 dholland Exp $ */
/*-
@@ -69,7 +69,7 @@ static const Char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@',
* if ``user'' isn't valid user name or ``txt'' doesn't start
* w/ '~', returns pointer to strdup()ed copy of ``txt''
*
- * it's callers's responsibility to free() returned string
+ * it's the caller's responsibility to free() the returned string
*/
char *
fn_tilde_expand(const char *txt)
@@ -80,7 +80,7 @@ fn_tilde_expand(const char *txt)
char pwbuf[1024];
if (txt[0] != '~')
- return (strdup(txt));
+ return strdup(txt);
temp = strchr(txt + 1, '/');
if (temp == NULL) {
@@ -104,7 +104,7 @@ fn_tilde_expand(const char *txt)
}
free(temp); /* value no more needed */
if (pass == NULL)
- return (strdup(txt));
+ return strdup(txt);
/* update pointer txt to point at string immedially following */
/* first slash */
@@ -116,7 +116,7 @@ fn_tilde_expand(const char *txt)
return NULL;
(void)snprintf(temp, tempsz, "%s/%s", pass->pw_dir, txt);
- return (temp);
+ return temp;
}
@@ -125,7 +125,7 @@ fn_tilde_expand(const char *txt)
* such file can be found
* value of ``state'' is ignored
*
- * it's caller's responsibility to free returned string
+ * it's the caller's responsibility to free the returned string
*/
char *
fn_filename_completion_function(const char *text, int state)
@@ -198,7 +198,7 @@ fn_filename_completion_function(const char *text, int state)
dir = opendir(dirpath);
if (!dir)
- return (NULL); /* cannot open the directory */
+ return NULL; /* cannot open the directory */
/* will be used in cycle */
filename_len = filename ? strlen(filename) : 0;
@@ -244,7 +244,7 @@ fn_filename_completion_function(const char *text, int state)
temp = NULL;
}
- return (temp);
+ return temp;
}
@@ -322,7 +322,7 @@ completion_matches(const char *text, char *(*genfunc)(const char *, int))
/* add NULL as last pointer to the array */
match_list[matches + 1] = (char *) NULL;
- return (match_list);
+ return match_list;
}
/*