diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-14 11:39:01 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-14 13:01:27 -0300 |
commit | d3558a8a8e8187c4485ca20a3ba187e58f64bff1 (patch) | |
tree | 8dbc5466ffdf8c705ab92415537c8033743c35dc | |
parent | 3fe49323862b95f928ef5b5542d570b6828886e2 (diff) |
libdvbv5: fix a nasty bug when printing stats
Depending on the stats condition, the statistics line is not
printed, because the buffer pointer is incremented twice.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | lib/libdvbv5/dvb-fe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c index b9981e7f..af724dd0 100644 --- a/lib/libdvbv5/dvb-fe.c +++ b/lib/libdvbv5/dvb-fe.c @@ -1446,10 +1446,11 @@ int dvb_fe_snprintf_stat(struct dvb_v5_fe_parms *p, uint32_t cmd, break; } } - if (i < 0) + if (i < 0) { size = snprintf(*buf, *len, "%7s", ""); - *buf += size; - len -= size; + *buf += size; + len -= size; + } /* Add the status bits */ size = snprintf(*buf, *len, "(0x%02x)", status); |