summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-03-20 10:10:38 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-03-20 10:10:38 +0100
commite760b14f646004a7fe99e4561156a132a0572cdb (patch)
treee90c068eea96be4e3a98fd2f734617032e859182 /channels.c
parent86a9d179bd27177fafa0d0b5931c377e8b90e9d5 (diff)
downloadvdr-e760b14f646004a7fe99e4561156a132a0572cdb.tar.gz
vdr-e760b14f646004a7fe99e4561156a132a0572cdb.tar.bz2
Some fixes to avoid compiler warnings in gcc 4.0
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/channels.c b/channels.c
index dd230dae..3392d9aa 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 1.35 2005/02/06 09:44:53 kls Exp $
+ * $Id: channels.c 1.36 2005/03/19 15:56:38 kls Exp $
*/
#include "channels.h"
@@ -694,9 +694,12 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
char *p = strchr(vpidbuf, '+');
if (p)
*p++ = 0;
- sscanf(vpidbuf, "%d", &vpid);
- if (p)
- sscanf(p, "%d", &ppid);
+ if (sscanf(vpidbuf, "%d", &vpid) != 1)
+ return false;
+ if (p) {
+ if (sscanf(p, "%d", &ppid) != 1)
+ return false;
+ }
else
ppid = vpid;