tweaks: invert a condition, to get an early return instead of indentation

master
Benno Schulenberg 2021-10-12 17:11:52 +02:00
parent 7e807cdd2f
commit 99607a5bbe
1 changed files with 11 additions and 11 deletions

View File

@ -469,10 +469,11 @@ void save_poshistory(void)
/* Reload the position history file if it has been modified since last load. */
void reload_positions_if_needed(void)
{
poshiststruct *item, *nextone;
struct stat fileinfo;
if (stat(poshistname, &fileinfo) == 0 && fileinfo.st_mtime != latest_timestamp) {
poshiststruct *item, *nextone;
if (stat(poshistname, &fileinfo) != 0 || fileinfo.st_mtime == latest_timestamp)
return;
for (item = position_history; item != NULL; item = nextone) {
nextone = item->next;
@ -484,7 +485,6 @@ void reload_positions_if_needed(void)
load_poshistory();
}
}
/* Update the recorded last file positions with the current position in the
* current buffer. If no existing entry is found, add a new one at the end. */