diff mbox

[4,of,7] czap: use %m modifier in sscanf instead of %a

Message ID 20100210183700.GO8026@aniel.lan (mailing list archive)
State Not Applicable
Headers show

Commit Message

Janne Grunau Feb. 10, 2010, 6:37 p.m. UTC
None
diff mbox

Patch

# HG changeset patch
# User Janne Grunau <j@jannau.net>
# Date 1265823785 -3600
# Node ID 0163e837905411bb9932bb65fecde5735e5bd7e9
# Parent  c1e4c34da4fd395755d98dbbdd7af2950d723a9d
czap: use %m modifier in sscanf instead of %a

%a is a old glibc extension and conflicts with
the floating point modifier %a in C99

diff -r c1e4c34da4fd -r 0163e8379054 util/szap/czap.c
--- a/util/szap/czap.c	Wed Feb 10 18:42:59 2010 +0100
+++ b/util/szap/czap.c	Wed Feb 10 18:43:05 2010 +0100
@@ -143,7 +143,7 @@ 
 	}
 	printf("%3d %s", chan_no, chan);
 
-	if ((sscanf(chan, "%a[^:]:%d:%a[^:]:%d:%a[^:]:%a[^:]:%d:%d\n",
+	if ((sscanf(chan, "%m[^:]:%d:%m[^:]:%d:%m[^:]:%m[^:]:%d:%d\n",
 				&name, &frontend->frequency,
 				&inv, &frontend->u.qam.symbol_rate,
 				&fec, &mod, vpid, apid) != 8)