diff options
author | 2015-10-16 23:18:59 +0000 | |
---|---|---|
committer | 2015-10-16 23:18:59 +0000 | |
commit | f369c40461be915f2813b12bc5f1eed502d816a1 (patch) | |
tree | 2dad400af9524a8a7c5aedb4de626aceb6b75bb3 | |
parent | Move the overflow check to alloc() so that the link struct overhead can (diff) | |
download | wireguard-openbsd-f369c40461be915f2813b12bc5f1eed502d816a1.tar.xz wireguard-openbsd-f369c40461be915f2813b12bc5f1eed502d816a1.zip |
Change x_do_ins()'s arg type from int to size_t for correctness's sake,
and to silence a compiler warning. Also remove its prototype, which is
directly above its definition.
ok tedu@
-rw-r--r-- | bin/ksh/emacs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c index 8597b80306a..0045b698cce 100644 --- a/bin/ksh/emacs.c +++ b/bin/ksh/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.57 2015/10/16 17:14:04 mmcc Exp $ */ +/* $OpenBSD: emacs.c,v 1.58 2015/10/16 23:18:59 mmcc Exp $ */ /* * Emacs-like command line editing and history @@ -413,10 +413,8 @@ x_ins_string(int c) return x_insert(c); } -static int x_do_ins(const char *cp, int len); - static int -x_do_ins(const char *cp, int len) +x_do_ins(const char *cp, size_t len) { if (xep+len >= xend) { x_e_putc(BEL); |