summaryrefslogtreecommitdiffstats
path: root/src/history.c
diff options
context:
space:
mode:
authorIku <iku@yokattana.com>2017-02-09 08:02:11 +0100
committerIku <iku@yokattana.com>2017-02-09 09:09:31 +0100
commit895334d111060e805fbbe60b9020f6c32f3b90c5 (patch)
treed361f38c0da23960884e42191767364bce2d541d /src/history.c
parent474e05785ad4ecb3b40626093c51e9f69acf9000 (diff)
Address compiler warnings
(Compiling with GCC 4.8.4 on LXSS/Ubuntu) - unused results - incorrect size argument in fgetws One unused result warning, for dup(), has not been addressed because the author is not familiar with its use.
Diffstat (limited to 'src/history.c')
-rw-r--r--src/history.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/history.c b/src/history.c
index 724782b..198bb46 100644
--- a/src/history.c
+++ b/src/history.c
@@ -74,8 +74,7 @@ void load_history(struct history * h) {
f = fopen(infofile, "r");
if (f == NULL) return;
while ( feof(f) == 0 ) {
-
- fgetws(linea, sizeof(linea), f);
+ if (!fgetws(linea, sizeof(linea) / sizeof(*linea), f)) break;
int s = wcslen(linea)-1;
del_range_wchars(linea, s, s);