more minor variable tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2814 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
892396bb7d
Коммит
e927ce59d1
@ -6,12 +6,11 @@ CVS code -
|
||||
- If constant cursor position display is on when we finish, make
|
||||
sure the cursor position is displayed properly. (DLR)
|
||||
do_alt_speller()
|
||||
- Rename variable msglen to msg_len, for consistency, and make
|
||||
it a size_t instead of an int. Also remove unnecessary
|
||||
initialization of altspell_error. (DLR)
|
||||
- If we can't invoke the spell checker, use sprintf() instead of
|
||||
snprintf() to write the error string we return, as
|
||||
altspell_error will always be long enough to hold it. (DLR)
|
||||
altspell_error will always be long enough to hold it. Also
|
||||
remove unnecessary initialization of altspell_error, and
|
||||
refactor so that msglen is no longer needed. (DLR)
|
||||
allow_pending_sigwinch()
|
||||
- Simplify by using the "?" operator instead of an if clause.
|
||||
(DLR)
|
||||
|
@ -2400,7 +2400,6 @@ const char *do_alt_speller(char *tempfile_name)
|
||||
WEXITSTATUS(alt_spell_status) != 0) {
|
||||
char *altspell_error;
|
||||
char *invoke_error = _("Could not invoke \"%s\"");
|
||||
size_t msg_len = strlen(invoke_error) + strlen(alt_speller) + 2;
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Turn the mark back on if it was on before. */
|
||||
@ -2408,7 +2407,9 @@ const char *do_alt_speller(char *tempfile_name)
|
||||
SET(MARK_ISSET);
|
||||
#endif
|
||||
|
||||
altspell_error = charalloc(msg_len);
|
||||
altspell_error =
|
||||
charalloc(strlen(invoke_error) +
|
||||
strlen(alt_speller) + 2);
|
||||
sprintf(altspell_error, invoke_error, alt_speller);
|
||||
return altspell_error;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user