summaryrefslogtreecommitdiff
path: root/common.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2009-09-27 22:40:45 +0200
committerJochen Dolze <vdr@dolze.de>2009-09-27 22:40:45 +0200
commitc51d2148c69cdda76f5b72e25a52c73c2b319f95 (patch)
treed259b20c39547b4a6f676685952ce47314a7f8aa /common.cpp
parent577280a1796e5cf90d5eb05d2232690ab83f0bd8 (diff)
downloadvdr-plugin-markad-c51d2148c69cdda76f5b72e25a52c73c2b319f95.tar.gz
vdr-plugin-markad-c51d2148c69cdda76f5b72e25a52c73c2b319f95.tar.bz2
Fixed handling of asprintf result
Diffstat (limited to 'common.cpp')
-rw-r--r--common.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/common.cpp b/common.cpp
index 8869265..d8549e5 100644
--- a/common.cpp
+++ b/common.cpp
@@ -60,9 +60,8 @@ void cMarkAdCommon::SetTimerMarks(int LastIFrame)
if ((time(NULL)>macontext->General.StartTime) && (!macontext->State.ContentStarted))
{
char *buf=NULL;
- asprintf(&buf,"start of %s content (%i)",
- macontext->General.ManualRecording ? "user" : "event",LastIFrame);
- if (buf)
+ if (asprintf(&buf,"start of %s content (%i)",
+ macontext->General.ManualRecording ? "user" : "event",LastIFrame)!=-1)
{
isyslog("markad [%i]: %s",recvnumber,buf);
AddMark(LastIFrame,buf);
@@ -75,9 +74,8 @@ void cMarkAdCommon::SetTimerMarks(int LastIFrame)
(macontext->State.ContentStarted) && (!macontext->State.ContentStopped))
{
char *buf=NULL;
- asprintf(&buf,"stop of %s content (%i)",
- macontext->General.ManualRecording ? "user" : "event",LastIFrame);
- if (buf)
+ if (asprintf(&buf,"stop of %s content (%i)",
+ macontext->General.ManualRecording ? "user" : "event",LastIFrame)!=-1)
{
isyslog("markad [%i]: %s",recvnumber,buf);
AddMark(LastIFrame,buf);