From: Stanislaw Wadas
> Add error handling to fputs()/fgets() functions.
...
> - fputs(buf, fp);
> + if (fputs(buf, fp) == EOF) {
> + ERROR("write error");
> + fclose(fp);
> + return;
> + }
Pointless...
Most code that looks at the return value of fputs() or fprintf()
is broken.
What you probably want is:
fputs(buf, fp);
fflush(fp);
err = ferror(fp);
fclose(fp);
if (err) ...
David
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html