diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-06-01 13:56:50 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-06-01 14:05:48 -0500 |
commit | 05588ca59e8e8e584ac78fee747815ac7600d0f3 (patch) | |
tree | b673ed8145aa8750050bf64188a705d68b152d57 /src/smsutil.c | |
parent | d0a569b9c0251898a283ca70865501af7bd345f8 (diff) | |
download | ofono-05588ca59e8e8e584ac78fee747815ac7600d0f3.tar.bz2 |
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
Diffstat (limited to 'src/smsutil.c')
-rw-r--r-- | src/smsutil.c | 3 |
1 files changed, 2 insertions, 1 deletions
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]; |