diff options
author | Sijmen J. Mulder <ik@sjmulder.nl> | 2019-06-13 01:07:03 +0200 |
---|---|---|
committer | Sijmen J. Mulder <ik@sjmulder.nl> | 2019-06-13 01:07:03 +0200 |
commit | da60f55559f5e83753a39d0b4a7e88c5c26aef32 (patch) | |
tree | bfdf81d37986d53ef78024c38223d84e339460c0 /src/nnn.c | |
parent | 331d2a6cc5e275f85df345adc4f22ced5c717bd0 (diff) | |
download | nnn-da60f55559f5e83753a39d0b4a7e88c5c26aef32.tar.gz |
Don't ignore fwrite errors
Fixes warning on CentOS 6:
src/nnn.c:754: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -745,9 +745,9 @@ static void writecp(const char *buf, const size_t buflen) return; FILE *fp = fopen(g_cppath, "w"); - if (fp) { - fwrite(buf, 1, buflen, fp); + if (fwrite(buf, 1, buflen, fp) != buflen) + printwarn(NULL); fclose(fp); } else printwarn(NULL); |