summaryrefslogtreecommitdiff
path: root/recv.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 /recv.cpp
parent577280a1796e5cf90d5eb05d2232690ab83f0bd8 (diff)
downloadvdr-plugin-markad-c51d2148c69cdda76f5b72e25a52c73c2b319f95.tar.gz
vdr-plugin-markad-c51d2148c69cdda76f5b72e25a52c73c2b319f95.tar.bz2
Fixed handling of asprintf result
Diffstat (limited to 'recv.cpp')
-rw-r--r--recv.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/recv.cpp b/recv.cpp
index f9562bf..f0cd2c5 100644
--- a/recv.cpp
+++ b/recv.cpp
@@ -128,8 +128,7 @@ cMarkAdReceiver::~cMarkAdReceiver()
tempmark.Position=lastiframe;
char *buf;
- asprintf(&buf,"stop of user content (%i)",lastiframe);
- if (buf)
+ if (asprintf(&buf,"stop of user content (%i)",lastiframe)!=-1)
{
tempmark.Comment=buf;
AddMark(&tempmark,0);
@@ -239,8 +238,7 @@ void cMarkAdReceiver::AddMark(MarkAdMark *mark, int Priority)
if (newmark)
{
char *buf;
- asprintf(&buf,"P%i %s",Priority,mark->Comment);
- if (buf)
+ if (asprintf(&buf,"P%i %s",Priority,mark->Comment)!=-1)
{
if (newmark->comment) free(newmark->comment);
newmark->comment=buf;