From: David Lawrence Ramsey Date: Fri, 29 Apr 2005 13:16:05 +0000 (+0000) Subject: document the simplification of a history check in nanogetstr(), and X-Git-Tag: v1.3.8~304 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=198bd592ffad02198b2d7f88707572ce3e365c84;p=nano.git document the simplification of a history check in nanogetstr(), and remove an extra parenthesis so it actually compiles (oops) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2496 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 57a86740..9192a6c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,6 +42,8 @@ CVS code - num_of_digits() - Use a size_t instead of an int, and rename to digits(). (DLR) - winio.c: + nanogetstr() + - Simplify one of the history checks. (DLR) do_help() - Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for consistency. (DLR) diff --git a/src/winio.c b/src/winio.c index 3d4483f3..e48c393d 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2543,7 +2543,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *def, * history, and we need to save the current answer * in currentbuf. Do this and reset use_cb to 0. */ if (currentbuf != NULL && use_cb == 1 && - strcmp(currentbuf, answer) != 0)) { + strcmp(currentbuf, answer) != 0) { currentbuf = mallocstrcpy(currentbuf, answer); use_cb = 0; }