Reducing the number of indentation steps.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
774c8ba1bf
commit
96b9249f91
|
@ -6,6 +6,7 @@
|
||||||
load_poshistory): Differentiate variable name from function names.
|
load_poshistory): Differentiate variable name from function names.
|
||||||
* src/files.c (load_poshistory): Remove a senseless iteration.
|
* src/files.c (load_poshistory): Remove a senseless iteration.
|
||||||
* src/files.c (load_poshistory): Condense the reading of a line.
|
* src/files.c (load_poshistory): Condense the reading of a line.
|
||||||
|
* src/files.c (load_poshistory): Reduce the indentation.
|
||||||
|
|
||||||
GNU nano 2.5.1 - 2016.01.11
|
GNU nano 2.5.1 - 2016.01.11
|
||||||
|
|
||||||
|
|
15
src/files.c
15
src/files.c
|
@ -3201,17 +3201,19 @@ int check_poshistory(const char *file, ssize_t *line, ssize_t *column)
|
||||||
void load_poshistory(void)
|
void load_poshistory(void)
|
||||||
{
|
{
|
||||||
char *poshist = poshistfilename();
|
char *poshist = poshistfilename();
|
||||||
|
FILE *hist;
|
||||||
|
|
||||||
/* Assume do_rcfile() has reported a missing home directory. */
|
/* If the home directory is missing, do_rcfile() will have reported it. */
|
||||||
if (poshist != NULL) {
|
if (poshist == NULL)
|
||||||
FILE *hist = fopen(poshist, "rb");
|
return;
|
||||||
|
|
||||||
|
hist = fopen(poshist, "rb");
|
||||||
|
|
||||||
if (hist == NULL) {
|
if (hist == NULL) {
|
||||||
if (errno != ENOENT) {
|
if (errno != ENOENT) {
|
||||||
/* Don't save history when we quit. */
|
/* When reading failed, don't save history when we quit. */
|
||||||
UNSET(POS_HISTORY);
|
UNSET(POS_HISTORY);
|
||||||
history_error(N_("Error reading %s: %s"), poshist,
|
history_error(N_("Error reading %s: %s"), poshist, strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
char *line = NULL, *lineptr, *xptr;
|
char *line = NULL, *lineptr, *xptr;
|
||||||
|
@ -3247,6 +3249,5 @@ void load_poshistory(void)
|
||||||
free(line);
|
free(line);
|
||||||
}
|
}
|
||||||
free(poshist);
|
free(poshist);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif /* !DISABLE_HISTORIES */
|
#endif /* !DISABLE_HISTORIES */
|
||||||
|
|
Loading…
Reference in New Issue