diff --git a/ChangeLog b/ChangeLog index 8fb35276a0ec8e58f6a01db5b7e043d512b28bcf..7a2084c062570840f5fbfa5b92f581aa050a9d06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -58,6 +58,7 @@ CVS code - do_insertfile() - Readd the NANO_SMALL #ifdef around the start_again: label to avoid a warning. (DLR) + - Simplify by reusing variables where possible. (DLR) - global.c: shortcut_init() - Remove redundant NANO_SMALL #ifdef. (DLR) diff --git a/src/files.c b/src/files.c index e273fa1c6a748ccaab5e3ec6a7f257208ca41819..e356c4e795d609e5e08b710f32e3f62281b1092f 100644 --- a/src/files.c +++ b/src/files.c @@ -520,13 +520,10 @@ void do_insertfile(void) } #endif /* ENABLE_MULTIBUFFER */ if (i == NANO_EXTCMD_KEY) { - char *ans = mallocstrcpy(NULL, answer); - int ts = statusq(TRUE, extcmd_list, ans, NULL, + int j = statusq(TRUE, extcmd_list, ans, NULL, _("Command to execute")); - free(ans); - - if (ts == -1 || answer == NULL || answer[0] == '\0') + if (j == -1 || answer == NULL || answer[0] == '\0') goto start_again; } #endif /* !NANO_SMALL */