diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-01-02 10:18:16 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-01-30 12:10:03 +0100 |
commit | 36b5e1ee2029f2aa6cd189918d61153d913415a5 (patch) | |
tree | 6d48dc5496c96ef1919ef49ecac56c07949278bd | |
parent | fec1c43f809d6bffffd8f56554807497d7be5ac0 (diff) | |
download | ModemManager-36b5e1ee2029f2aa6cd189918d61153d913415a5.tar.gz |
ublox: the whole list of supported bands is known
So, assert() if for any reason we're asking to use a band that we
don't find in the list.
-rw-r--r-- | plugins/ublox/mm-modem-helpers-ublox.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c index 442ff601e..28fa120d6 100644 --- a/plugins/ublox/mm-modem-helpers-ublox.c +++ b/plugins/ublox/mm-modem-helpers-ublox.c @@ -1166,6 +1166,7 @@ band_to_num (MMModemBand band) } } + /* Should never happen */ return 0; } @@ -1327,8 +1328,8 @@ mm_ublox_build_ubandsel_set_command (GArray *bands, if (found) { num = band_to_num (band); - if (num) - g_array_append_val (ubandsel_nums, num); + g_assert (num != 0); + g_array_append_val (ubandsel_nums, num); } } |