diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-12-28 11:37:42 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-12-28 11:37:42 +0100 |
commit | 6a8a2cf5fb78a244db19a2b49da98e0d1d2d91a0 (patch) | |
tree | 1c4295c11bbee8a48638baeb617a1166faef42d6 /channels.c | |
parent | c949ad35cc83462e47fc61d5bee43fc9446bee02 (diff) | |
download | vdr-6a8a2cf5fb78a244db19a2b49da98e0d1d2d91a0.tar.gz vdr-6a8a2cf5fb78a244db19a2b49da98e0d1d2d91a0.tar.bz2 |
Changed '%a' to the POSIX compliant '%m' in all scanf() calls
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 3.2 2013/11/04 10:11:51 kls Exp $ + * $Id: channels.c 3.3 2013/12/28 11:33:08 kls Exp $ */ #include "channels.h" @@ -29,7 +29,7 @@ tChannelID tChannelID::FromString(const char *s) int tid; int sid; int rid = 0; - int fields = sscanf(s, "%a[^-]-%d-%d-%d-%d", &sourcebuf, &nid, &tid, &sid, &rid); + int fields = sscanf(s, "%m[^-]-%d-%d-%d-%d", &sourcebuf, &nid, &tid, &sid, &rid); if (fields == 4 || fields == 5) { int source = cSource::FromString(sourcebuf); free(sourcebuf); @@ -589,7 +589,7 @@ bool cChannel::Parse(const char *s) char *apidbuf = NULL; char *tpidbuf = NULL; char *caidbuf = NULL; - int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%a[^:]:%a[^:]:%a[^:]:%a[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpidbuf, &caidbuf, &sid, &nid, &tid, &rid); + int fields = sscanf(s, "%m[^:]:%d :%m[^:]:%m[^:] :%d :%m[^:]:%m[^:]:%m[^:]:%m[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpidbuf, &caidbuf, &sid, &nid, &tid, &rid); if (fields >= 9) { if (fields == 9) { // allow reading of old format |