From e760b14f646004a7fe99e4561156a132a0572cdb Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 20 Mar 2005 10:10:38 +0100 Subject: Some fixes to avoid compiler warnings in gcc 4.0 --- channels.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'channels.c') 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; -- cgit v1.2.3