From: anton Date: Sun, 25 Jun 2017 17:28:39 +0000 (+0000) Subject: No need to NUL-terminate the line buffer since it's handled by x_e_getu8() by X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d7b285d19dae60cd691ceec3121d7ac400779980;p=openbsd No need to NUL-terminate the line buffer since it's handled by x_e_getu8() by now. ok schwarze@ --- diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c index 9e9b4c58fbf..ae0a9fd6cd9 100644 --- a/bin/ksh/emacs.c +++ b/bin/ksh/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.69 2017/06/25 08:51:52 anton Exp $ */ +/* $OpenBSD: emacs.c,v 1.70 2017/06/25 17:28:39 anton Exp $ */ /* * Emacs-like command line editing and history @@ -309,7 +309,6 @@ x_emacs(char *buf, size_t len) x_nextcmd = -1; } - line[0] = '\0'; x_literal_set = 0; x_arg = -1; x_last_command = NULL; @@ -392,7 +391,6 @@ x_emacs(char *buf, size_t len) /* reset meta sequence */ at = ntries = 0; - line[0] = '\0'; if (x_arg_set) x_arg_set = 0; /* reset args next time around */ else