summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-03-23 16:17:39 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-03-23 16:17:39 +0100
commitc751c195c1a57e6738d402f5b4d42357b8e580d0 (patch)
treede7c66bb18cc0772d36fa9642ed7afc215f4538c /recording.c
parentef91debc4d181be5c34207cf32d127b3058f4697 (diff)
downloadvdr-c751c195c1a57e6738d402f5b4d42357b8e580d0.tar.gz
vdr-c751c195c1a57e6738d402f5b4d42357b8e580d0.tar.bz2
Improved usage of 'safe_write()'
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c4
1 files changed, 2 insertions, 2 deletions
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;