mirror of
https://github.com/jarun/nnn.git
synced 2025-01-09 17:39:38 +00:00
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:
parent
331d2a6cc5
commit
da60f55559
|
@ -745,9 +745,9 @@ static void writecp(const char *buf, const size_t buflen)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FILE *fp = fopen(g_cppath, "w");
|
FILE *fp = fopen(g_cppath, "w");
|
||||||
|
|
||||||
if (fp) {
|
if (fp) {
|
||||||
fwrite(buf, 1, buflen, fp);
|
if (fwrite(buf, 1, buflen, fp) != buflen)
|
||||||
|
printwarn(NULL);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
} else
|
} else
|
||||||
printwarn(NULL);
|
printwarn(NULL);
|
||||||
|
|
Loading…
Reference in a new issue