From 6a8a2cf5fb78a244db19a2b49da98e0d1d2d91a0 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 28 Dec 2013 11:37:42 +0100 Subject: Changed '%a' to the POSIX compliant '%m' in all scanf() calls --- diseqc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'diseqc.c') diff --git a/diseqc.c b/diseqc.c index 86ee61fe..2517caf6 100644 --- a/diseqc.c +++ b/diseqc.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: diseqc.c 3.2 2013/08/21 09:26:11 kls Exp $ + * $Id: diseqc.c 3.3 2013/12/28 11:33:08 kls Exp $ */ #include "diseqc.h" @@ -228,9 +228,9 @@ bool cDiseqc::Parse(const char *s) devices = CurrentDevices; bool result = false; char *sourcebuf = NULL; - int fields = sscanf(s, "%a[^ ] %d %c %d %a[^\n]", &sourcebuf, &slof, &polarization, &lof, &commands); + int fields = sscanf(s, "%m[^ ] %d %c %d %m[^\n]", &sourcebuf, &slof, &polarization, &lof, &commands); if (fields == 4) - commands = NULL; //XXX Apparently sscanf() doesn't work correctly if the last %a argument results in an empty string + commands = NULL; //XXX Apparently sscanf() doesn't work correctly if the last %m argument results in an empty string if (4 <= fields && fields <= 5) { source = cSource::FromString(sourcebuf); if (Sources.Get(source)) { -- cgit v1.2.3