dbg: check fwrite return value to avoid warning
This commit is contained in:
parent
8f795b2b22
commit
d9a494edde
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue