tweaks: remove an inconsistent newline from the end of an error message

There are eight other occurrences without the newline.
And an error message should not end in a newline anyway.
master
Benno Schulenberg 2020-09-21 19:25:07 +02:00
parent c3e74f02c2
commit 9c04d0c956
1 changed files with 6 additions and 6 deletions

View File

@ -361,7 +361,7 @@ void save_history(void)
histfile = fopen(histname, "wb");
if (histfile == NULL) {
jot_error(N_("Error writing %s: %s\n"), histname, strerror(errno));
jot_error(N_("Error writing %s: %s"), histname, strerror(errno));
free(histname);
return;
}
@ -371,10 +371,10 @@ void save_history(void)
if (!write_list(searchtop, histfile) || !write_list(replacetop, histfile) ||
!write_list(executetop, histfile))
jot_error(N_("Error writing %s: %s\n"), histname, strerror(errno));
jot_error(N_("Error writing %s: %s"), histname, strerror(errno));
if (fclose(histfile) == EOF)
jot_error(N_("Error writing %s: %s\n"), histname, strerror(errno));
jot_error(N_("Error writing %s: %s"), histname, strerror(errno));
free(histname);
}
@ -459,7 +459,7 @@ void save_poshistory(void)
FILE *histfile = fopen(poshistname, "wb");
if (histfile == NULL) {
jot_error(N_("Error writing %s: %s\n"), poshistname, strerror(errno));
jot_error(N_("Error writing %s: %s"), poshistname, strerror(errno));
return;
}
@ -483,13 +483,13 @@ void save_poshistory(void)
path_and_place[length - 1] = '\n';
if (fwrite(path_and_place, sizeof(char), length, histfile) < length)
jot_error(N_("Error writing %s: %s\n"), poshistname, strerror(errno));
jot_error(N_("Error writing %s: %s"), poshistname, strerror(errno));
free(path_and_place);
}
if (fclose(histfile) == EOF)
jot_error(N_("Error writing %s: %s\n"), poshistname, strerror(errno));
jot_error(N_("Error writing %s: %s"), poshistname, strerror(errno));
if (stat(poshistname, &fileinfo) == 0)
latest_timestamp = fileinfo.st_mtime;