diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-16 07:58:58 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-16 23:11:35 +0100 |
commit | 83b34e2f4808d38e82abcd8d4a5f161eba7e8c24 (patch) | |
tree | d08b141310893dcdcdf523cc2da0bdbea6eacb4e /util/spkmodem_recv/spkmodem-recv.c | |
parent | 22633e0dc06a6d46306832230e874af49a2bbf34 (diff) |
util/spkmodem_recv: Reduced indentation in loop
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/spkmodem_recv/spkmodem-recv.c')
-rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index d31e6f8c..a910b054 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -67,31 +67,31 @@ main () if (llp == FLUSH_TIMEOUT) fflush (stdout); - if (f2 > FREQ_SEP_MIN && f2 < FREQ_SEP_MAX - && f1 > FREQ_DATA_MIN && f1 < FREQ_DATA_MAX) { + if (f2 <= FREQ_SEP_MIN || f2 >= FREQ_SEP_MAX + || f1 <= FREQ_DATA_MIN || f1 >= FREQ_DATA_MAX) { + read_sample (); + continue; + } #if DEBUG - printf ("%d %d %d @%d\n", f1, f2, FREQ_DATA_THRESHOLD, - ftell (stdin) - sizeof (trame)); + printf ("%d %d %d @%d\n", f1, f2, FREQ_DATA_THRESHOLD, + ftell (stdin) - sizeof (trame)); #endif - if (f1 < FREQ_DATA_THRESHOLD) - c |= (1 << bitn); - bitn--; - if (bitn < 0) { + if (f1 < FREQ_DATA_THRESHOLD) + c |= (1 << bitn); + bitn--; + if (bitn < 0) { #if DEBUG - printf ("<%c, %x>", c, c); + printf ("<%c, %x>", c, c); #else - printf ("%c", c); + printf ("%c", c); #endif - bitn = 7; - c = 0; - } - lp = 0; - llp = 0; - for (i = 0; i < SAMPLES_PER_TRAME; i++) - read_sample (); - continue; + bitn = 7; + c = 0; } - read_sample (); + lp = 0; + llp = 0; + for (i = 0; i < SAMPLES_PER_TRAME; i++) + read_sample (); } return 0; } |