From 05588ca59e8e8e584ac78fee747815ac7600d0f3 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 1 Jun 2009 13:56:50 -0500 Subject: Squash another uninitialized warning GCC is smart enough to detect that oct is only set if the next_octet function succeeds. However, we've already checked that buf is big enough, so it should always succeed. Still, lets keep gcc happy --- src/smsutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/smsutil.c b/src/smsutil.c index 1f3886ec..9078f3f5 100644 --- a/src/smsutil.c +++ b/src/smsutil.c @@ -454,7 +454,8 @@ static gboolean decode_address(const unsigned char *pdu, int len, unsigned char oct; for (i = 0; i < byte_len; i++) { - next_octet(pdu, len, offset, &oct); + if (!next_octet(pdu, len, offset, &oct)) + break; out->address[i*2] = digit_lut[oct & 0x0f]; out->address[i*2+1] = digit_lut[(oct & 0xf0) >> 4]; -- cgit v1.2.3