Explorar el Código

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
master
Sijmen J. Mulder hace 6 años
padre
commit
da60f55559
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      src/nnn.c

+ 2
- 2
src/nnn.c Ver fichero

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


Cargando…
Cancelar
Guardar