From gregor at gmx.se Mon Oct 1 18:35:54 2012 From: gregor at gmx.se (Gregor) Date: Mon, 01 Oct 2012 20:35:54 +0200 Subject: [PATCH] Add missing if braces in decode_chan_alloc Message-ID: <20121001183554.151620@gmx.com> Took me longer then it should to find it. From gregor at gmx.se Mon Oct 1 17:48:11 2012 From: gregor at gmx.se (Gregor Gregoric) Date: Mon, 1 Oct 2012 19:48:11 +0200 Subject: [PATCH] Add missing if braces in decode_chan_alloc Message-ID: --- src/tetra_mac_pdu.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tetra_mac_pdu.c b/src/tetra_mac_pdu.c index 882a0e7..70b5ec9 100644 --- a/src/tetra_mac_pdu.c +++ b/src/tetra_mac_pdu.c @@ -93,8 +93,10 @@ static int decode_chan_alloc(struct tetra_chan_alloc_decoded *cad, const uint8_t cad->ext_carr.reverse_oper = bits_to_uint(cur, 1); cur += 1; } cad->monit_pattern = bits_to_uint(cur, 2); cur += 2; - if (cad->monit_pattern == 0) - cad->monit_patt_f18 = bits_to_uint(cur, 2); cur += 2; + if (cad->monit_pattern == 0) { + cad->monit_patt_f18 = bits_to_uint(cur, 2); + cur += 2; + } if (cad->ul_dl == 0) { cad->aug.ul_dl_ass = bits_to_uint(cur, 2); cur += 2; cad->aug.bandwidth = bits_to_uint(cur, 3); cur += 3; -- 1.7.4.1 --========GMX151621349116554584744-- From laforge at gnumonks.org Thu Oct 4 16:32:26 2012 From: laforge at gnumonks.org (Harald Welte) Date: Thu, 4 Oct 2012 18:32:26 +0200 Subject: [PATCH] Add missing if braces in decode_chan_alloc In-Reply-To: <20121001183554.151620@gmx.com> References: <20121001183554.151620@gmx.com> Message-ID: <20121004163226.GJ4735@prithivi.gnumonks.org> On Mon, Oct 01, 2012 at 08:35:54PM +0200, Gregor wrote: > Took me longer then it should to find it. Thanks, really good catch, and my apologies for causing such a stupid bug in the first place. Patch merged. -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)