mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 04:41:21 +03:00
Eliding the now too tiny function free_list_item().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5708 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
c02c182bd7
commit
90f1ccf9ac
@ -3,6 +3,7 @@
|
|||||||
regular expression when it matched -- drop this tiny optimization
|
regular expression when it matched -- drop this tiny optimization
|
||||||
for when opening multiple files. Instead stop calling malloc().
|
for when opening multiple files. Instead stop calling malloc().
|
||||||
* src/nano.h: Delete a now-unused struct member.
|
* src/nano.h: Delete a now-unused struct member.
|
||||||
|
* src/global.c (free_list_item): Elide this now too tiny function.
|
||||||
|
|
||||||
2016-03-01 Benno Schulenberg <bensberg@justemail.net>
|
2016-03-01 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/rcfile.c (parse_syntax), src/color.c (color_update): Don't
|
* src/rcfile.c (parse_syntax), src/color.c (color_update): Don't
|
||||||
|
17
src/global.c
17
src/global.c
@ -1623,14 +1623,6 @@ int strtomenu(const char *input)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#ifndef DISABLE_COLOR
|
|
||||||
void free_list_item(regexlisttype *dropit)
|
|
||||||
{
|
|
||||||
free(dropit->full_regex);
|
|
||||||
free(dropit);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This function is used to gracefully return all the memory we've used.
|
/* This function is used to gracefully return all the memory we've used.
|
||||||
* It should be called just before calling exit(). Practically, the
|
* It should be called just before calling exit(). Practically, the
|
||||||
* only effect is to cause a segmentation fault if the various data
|
* only effect is to cause a segmentation fault if the various data
|
||||||
@ -1684,17 +1676,20 @@ void thanks_for_all_the_fish(void)
|
|||||||
while (syntaxes->extensions != NULL) {
|
while (syntaxes->extensions != NULL) {
|
||||||
regexlisttype *bob = syntaxes->extensions;
|
regexlisttype *bob = syntaxes->extensions;
|
||||||
syntaxes->extensions = bob->next;
|
syntaxes->extensions = bob->next;
|
||||||
free_list_item(bob);
|
free(bob->full_regex);
|
||||||
|
free(bob);
|
||||||
}
|
}
|
||||||
while (syntaxes->headers != NULL) {
|
while (syntaxes->headers != NULL) {
|
||||||
regexlisttype *bob = syntaxes->headers;
|
regexlisttype *bob = syntaxes->headers;
|
||||||
syntaxes->headers = bob->next;
|
syntaxes->headers = bob->next;
|
||||||
free_list_item(bob);
|
free(bob->full_regex);
|
||||||
|
free(bob);
|
||||||
}
|
}
|
||||||
while (syntaxes->magics != NULL) {
|
while (syntaxes->magics != NULL) {
|
||||||
regexlisttype *bob = syntaxes->magics;
|
regexlisttype *bob = syntaxes->magics;
|
||||||
syntaxes->magics = bob->next;
|
syntaxes->magics = bob->next;
|
||||||
free_list_item(bob);
|
free(bob->full_regex);
|
||||||
|
free(bob);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (syntaxes->color != NULL) {
|
while (syntaxes->color != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user