diff options
author | scop <scop> | 2005-03-22 21:05:45 +0000 |
---|---|---|
committer | scop <scop> | 2005-03-22 21:05:45 +0000 |
commit | 27e4b6b82dffe5585ca0f563ff34c3e329652949 (patch) | |
tree | 99a93be0dae735ae4141cf9f6e82d3f73327143d | |
parent | 0642308cc7030d4f07054f0a3a2d0a9d35125cf1 (diff) | |
download | vdr-plugin-dxr3-27e4b6b82dffe5585ca0f563ff34c3e329652949.tar.gz vdr-plugin-dxr3-27e4b6b82dffe5585ca0f563ff34c3e329652949.tar.bz2 |
Fix fwrite() return value check.
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | dxr3device.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -282,3 +282,4 @@ NOTE: I havent found time to include all of the languages, will be done in pre2 memcpy routines on more systems (Ville Skyttä) - avoid hang in pause mode with VDR >= 1.3.18 (Luca Olivetti) - fix compilation with -fPIC, kudos to ffmpeg (Ville Skyttä) +- eliminate some compiler warnings (Ville Skyttä) diff --git a/dxr3device.c b/dxr3device.c index 96644eb..b42ed7f 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -447,7 +447,8 @@ bool cDxr3Device::GrabImage(const char *FileName, bool Jpeg, int Quality, int Si else { ///< write PNM file: - if (fprintf(f, "P6\n%d\n%d\n255\n", w, h) < 0 || fwrite(Data, w * h * 3, 1, f) < 0) + if (fprintf(f, "P6\n%d\n%d\n255\n", w, h) < 0 || + fwrite(Data, w * h * 3, 1, f) != 1) { LOG_ERROR_STR(FileName); } |