summaryrefslogtreecommitdiffstats
path: root/lib/libedit/chared.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/chared.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/chared.c')
-rw-r--r--lib/libedit/chared.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c
index 101c23e7b77..da3d9224cd1 100644
--- a/lib/libedit/chared.c
+++ b/lib/libedit/chared.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chared.c,v 1.14 2016/01/30 02:52:41 schwarze Exp $ */
+/* $OpenBSD: chared.c,v 1.15 2016/01/30 12:22:20 schwarze Exp $ */
/* $NetBSD: chared.c,v 1.28 2009/12/30 22:37:40 christos Exp $ */
/*-
@@ -195,7 +195,7 @@ c_delbefore1(EditLine *el)
protected int
ce__isword(Int p)
{
- return (Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL);
+ return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL;
}
@@ -219,7 +219,7 @@ cv__isword(Int p)
protected int
cv__isWord(Int p)
{
- return (!Isspace(p));
+ return !Isspace(p);
}
@@ -243,7 +243,7 @@ c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int))
if (p < low)
p = low;
/* cp now points where we want it */
- return (p);
+ return p;
}
@@ -262,7 +262,7 @@ c__next_word(Char *p, Char *high, int n, int (*wtest)(Int))
if (p > high)
p = high;
/* p now points where we want it */
- return (p);
+ return p;
}
/* cv_next_word():
@@ -288,9 +288,9 @@ cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int))
/* p now points where we want it */
if (p > high)
- return (high);
+ return high;
else
- return (p);
+ return p;
}
@@ -314,9 +314,9 @@ cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int))
/* p now points where we want it */
if (p < low)
- return (low);
+ return low;
else
- return (p);
+ return p;
}
@@ -377,7 +377,7 @@ cv__endword(Char *p, Char *high, int n, int (*wtest)(Int))
p++;
}
p--;
- return (p);
+ return p;
}
/* ch_init():
@@ -391,7 +391,7 @@ ch_init(EditLine *el)
el->el_line.buffer = reallocarray(NULL, EL_BUFSIZ,
sizeof(*el->el_line.buffer));
if (el->el_line.buffer == NULL)
- return (-1);
+ return -1;
(void) memset(el->el_line.buffer, 0, EL_BUFSIZ *
sizeof(*el->el_line.buffer));
@@ -402,7 +402,7 @@ ch_init(EditLine *el)
el->el_chared.c_undo.buf = reallocarray(NULL, EL_BUFSIZ,
sizeof(*el->el_chared.c_undo.buf));
if (el->el_chared.c_undo.buf == NULL)
- return (-1);
+ return -1;
(void) memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ *
sizeof(*el->el_chared.c_undo.buf));
el->el_chared.c_undo.len = -1;
@@ -410,7 +410,7 @@ ch_init(EditLine *el)
el->el_chared.c_redo.buf = reallocarray(NULL, EL_BUFSIZ,
sizeof(*el->el_chared.c_redo.buf));
if (el->el_chared.c_redo.buf == NULL)
- return (-1);
+ return -1;
el->el_chared.c_redo.pos = el->el_chared.c_redo.buf;
el->el_chared.c_redo.lim = el->el_chared.c_redo.buf + EL_BUFSIZ;
el->el_chared.c_redo.cmd = ED_UNASSIGNED;
@@ -421,7 +421,7 @@ ch_init(EditLine *el)
el->el_chared.c_kill.buf = reallocarray(NULL, EL_BUFSIZ,
sizeof(*el->el_chared.c_kill.buf));
if (el->el_chared.c_kill.buf == NULL)
- return (-1);
+ return -1;
(void) memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ *
sizeof(*el->el_chared.c_kill.buf));
el->el_chared.c_kill.mark = el->el_line.buffer;
@@ -442,8 +442,8 @@ ch_init(EditLine *el)
ma->macro = reallocarray(NULL, EL_MAXMACRO,
sizeof(*ma->macro));
if (ma->macro == NULL)
- return (-1);
- return (0);
+ return -1;
+ return 0;
}
/* ch_reset():
@@ -609,16 +609,16 @@ FUN(el,insertstr)(EditLine *el, const Char *s)
size_t len;
if ((len = Strlen(s)) == 0)
- return (-1);
+ return -1;
if (el->el_line.lastchar + len >= el->el_line.limit) {
if (!ch_enlargebufs(el, len))
- return (-1);
+ return -1;
}
c_insert(el, (int)len);
while (*s)
*el->el_line.cursor++ = *s++;
- return (0);
+ return 0;
}
@@ -717,7 +717,7 @@ c_hpos(EditLine *el)
* Find how many characters till the beginning of this line.
*/
if (el->el_line.cursor == el->el_line.buffer)
- return (0);
+ return 0;
else {
for (ptr = el->el_line.cursor - 1;
ptr >= el->el_line.buffer && *ptr != '\n';