tweaks: don't bother reallocating a string of which there is only one
And which normally is just some ten or twenty characters long, and never gets wildly overallocated.master
parent
0562d27b9c
commit
1144d38316
|
@ -239,7 +239,6 @@ char *do_browser(char *path)
|
||||||
|
|
||||||
/* Convert newlines to nulls in the directory name. */
|
/* Convert newlines to nulls in the directory name. */
|
||||||
sunder(answer);
|
sunder(answer);
|
||||||
align(&answer);
|
|
||||||
|
|
||||||
path = free_and_assign(path, real_dir_from_tilde(answer));
|
path = free_and_assign(path, real_dir_from_tilde(answer));
|
||||||
|
|
||||||
|
|
|
@ -1175,7 +1175,6 @@ void do_insertfile(void)
|
||||||
|
|
||||||
/* Convert newlines to nulls in the given filename. */
|
/* Convert newlines to nulls in the given filename. */
|
||||||
sunder(answer);
|
sunder(answer);
|
||||||
align(&answer);
|
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (execute) {
|
if (execute) {
|
||||||
|
@ -2403,7 +2402,6 @@ int do_writeout(bool exiting)
|
||||||
|
|
||||||
/* Convert newlines to nulls, just before we save the file. */
|
/* Convert newlines to nulls, just before we save the file. */
|
||||||
sunder(answer);
|
sunder(answer);
|
||||||
align(&answer);
|
|
||||||
|
|
||||||
/* Here's where we allow the selected text to be written to
|
/* Here's where we allow the selected text to be written to
|
||||||
* a separate file. If we're using restricted mode, this
|
* a separate file. If we're using restricted mode, this
|
||||||
|
|
|
@ -306,7 +306,6 @@ void do_statusbar_delete(void)
|
||||||
|
|
||||||
charmove(answer + statusbar_x, answer + statusbar_x + char_len,
|
charmove(answer + statusbar_x, answer + statusbar_x + char_len,
|
||||||
strlen(answer) - statusbar_x - char_len + 1);
|
strlen(answer) - statusbar_x - char_len + 1);
|
||||||
align(&answer);
|
|
||||||
|
|
||||||
update_the_statusbar();
|
update_the_statusbar();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue