diff options
author | Harald Welte <laforge@osmocom.org> | 2020-05-07 23:55:56 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-05-07 23:55:56 +0200 |
commit | cf35c37c9463f7ed45cbab7f9527649064abd133 (patch) | |
tree | d49ea523837fe57111b8edc744964a9aa8398a5f | |
parent | 6e369348b026006bb483b7d3eb57ce5828e5f6bc (diff) |
prbs-tool: Don't require C99
from a Debian8 build:
[ 256s] prbs-tool.c: In function 'apply_errors_prbs':
[ 256s] prbs-tool.c:190:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
[ 256s] for (int i = 0; i < sizeof(pchan->prbs_u)-4; i++) {
[ 256s] ^
Change-Id: I8541fce50405525efffb12210a269e0ab8a687ab
-rw-r--r-- | utils/prbs-tool.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/prbs-tool.c b/utils/prbs-tool.c index 0211453..664dc98 100644 --- a/utils/prbs-tool.c +++ b/utils/prbs-tool.c @@ -187,7 +187,9 @@ static void trx_data_init(struct trx_data *trx) /* apply any intentional errors to the output of the PRBS sequence */ static void apply_errors_prbs(struct pchan_data *pchan) { - for (int i = 0; i < sizeof(pchan->prbs_u)-4; i++) { + int i; + + for (i = 0; i < sizeof(pchan->prbs_u)-4; i++) { pchan->sim_flip_codec_bits.i++; if (pchan->sim_flip_codec_bits.i == pchan->sim_flip_codec_bits.nth_bit) { pchan->sim_flip_codec_bits.i = 0; @@ -237,7 +239,8 @@ static int pchan_get_next_burst(struct pchan_data *pchan, uint32_t fn, ubit_t *b rc = gsm0503_tch_fr_encode(pchan->bursts, pchan->tch_data, GSM_FR_BYTES, 1); OSMO_ASSERT(rc == 0); #if 0 - for (int i = 0; i < sizeof(pchan->bursts); i += GSM_BURST_BITS) + int i; + for (i = 0; i < sizeof(pchan->bursts); i += GSM_BURST_BITS) printf("\t%s\n", osmo_ubit_dump(pchan->bursts + i, GSM_BURST_BITS)); dec(pchan->bursts); |