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
This commit is contained in:
Sijmen J. Mulder 2019-06-13 01:07:03 +02:00
parent 331d2a6cc5
commit da60f55559
1 changed files with 2 additions and 2 deletions

View File

@ -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);