From c751c195c1a57e6738d402f5b4d42357b8e580d0 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 23 Mar 2002 16:17:39 +0100 Subject: Improved usage of 'safe_write()' --- recording.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recording.c') diff --git a/recording.c b/recording.c index 0121d6ce..bcbdfa65 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 1.58 2002/03/23 11:32:33 kls Exp $ + * $Id: recording.c 1.59 2002/03/23 16:15:32 kls Exp $ */ #include "recording.h" @@ -172,7 +172,7 @@ bool cResumeFile::Save(int Index) if (fileName) { int f = open(fileName, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (f >= 0) { - if (safe_write(f, &Index, sizeof(Index)) != sizeof(Index)) + if (safe_write(f, &Index, sizeof(Index)) < 0) LOG_ERROR_STR(fileName); close(f); return true; -- cgit v1.2.3