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
parent
c3e74f02c2
commit
9c04d0c956
|
@ -361,7 +361,7 @@ void save_history(void)
|
||||||
histfile = fopen(histname, "wb");
|
histfile = fopen(histname, "wb");
|
||||||
|
|
||||||
if (histfile == NULL) {
|
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);
|
free(histname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -371,10 +371,10 @@ void save_history(void)
|
||||||
|
|
||||||
if (!write_list(searchtop, histfile) || !write_list(replacetop, histfile) ||
|
if (!write_list(searchtop, histfile) || !write_list(replacetop, histfile) ||
|
||||||
!write_list(executetop, 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)
|
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);
|
free(histname);
|
||||||
}
|
}
|
||||||
|
@ -459,7 +459,7 @@ void save_poshistory(void)
|
||||||
FILE *histfile = fopen(poshistname, "wb");
|
FILE *histfile = fopen(poshistname, "wb");
|
||||||
|
|
||||||
if (histfile == NULL) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,13 +483,13 @@ void save_poshistory(void)
|
||||||
path_and_place[length - 1] = '\n';
|
path_and_place[length - 1] = '\n';
|
||||||
|
|
||||||
if (fwrite(path_and_place, sizeof(char), length, histfile) < length)
|
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);
|
free(path_and_place);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fclose(histfile) == EOF)
|
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)
|
if (stat(poshistname, &fileinfo) == 0)
|
||||||
latest_timestamp = fileinfo.st_mtime;
|
latest_timestamp = fileinfo.st_mtime;
|
||||||
|
|
Loading…
Reference in New Issue