From 5be6c9fd49eb11ea374c322687425230032afd51 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 7 Sep 2014 11:03:46 -0300 Subject: [PATCH] libdvbv5: get rid of bcd_to_int() This function used to be needed by some descriptors, but it is now unused. Remove it. Signed-off-by: Mauro Carvalho Chehab --- lib/libdvbv5/descriptors.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lib/libdvbv5/descriptors.c b/lib/libdvbv5/descriptors.c index c68ece9..eaee148 100644 --- a/lib/libdvbv5/descriptors.c +++ b/lib/libdvbv5/descriptors.c @@ -1322,25 +1322,6 @@ uint32_t dvb_bcd(uint32_t bcd) return ret; } -static int bcd_to_int(const unsigned char *bcd, int bits) -{ - int nibble = 0; - int ret = 0; - - while (bits) { - ret *= 10; - if (!nibble) - ret += *bcd >> 4; - else - ret += *bcd & 0x0f; - bits -= 4; - nibble = !nibble; - if (!nibble) - bcd++; - } - return ret; -} - void dvb_hexdump(struct dvb_v5_fe_parms *parms, const char *prefix, const unsigned char *data, int length) { char ascii[17]; -- 2.7.4