dbg: check fwrite return value to avoid warning

This commit is contained in:
Richard Aas 2011-10-26 07:08:26 +00:00
parent 8f795b2b22
commit d9a494edde

View file

@ -207,8 +207,8 @@ static void dbg_fmt_vprintf(int level, const char *fmt, va_list ap)
/* Output to file */
if (dbg.f) {
(void)fwrite(buf, 1, len, dbg.f);
(void)fflush(dbg.f);
if (fwrite(buf, 1, len, dbg.f) > 0)
(void)fflush(dbg.f);
}
out: