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.
This commit is contained in:
Aleksander Morgado
2019-01-30 12:10:03 +01:00
parent fec1c43f80
commit 36b5e1ee20
+3 -2
View File
@@ -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);
}
}