aboutsummaryrefslogtreecommitdiff
path: root/plugins/ublox/mm-modem-helpers-ublox.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-01-02 10:30:41 +0100
committerAleksander Morgado <aleksander@aleksander.es>2019-01-30 12:10:03 +0100
commit74bdc97b345f8df8cc8c19e969bb50b741cebae1 (patch)
treeb2f4b624219f119453d2b0d81007e6cf9da6fbf9 /plugins/ublox/mm-modem-helpers-ublox.c
parent8b9053822b28023eb10e3d5e83a3c9a829da7a63 (diff)
ublox: use fixed array sizes when iterating
Diffstat (limited to 'plugins/ublox/mm-modem-helpers-ublox.c')
-rw-r--r--plugins/ublox/mm-modem-helpers-ublox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c
index 0da30993..ef84dc9f 100644
--- a/plugins/ublox/mm-modem-helpers-ublox.c
+++ b/plugins/ublox/mm-modem-helpers-ublox.c
@@ -1210,7 +1210,7 @@ append_bands (GArray *bands,
if (mode & MM_MODEM_MODE_4G) {
for (j = 0; j < G_N_ELEMENTS (num_bands_4g); j++) {
if (ubandsel_value == num_bands_4g[j].num) {
- for (k = 0; k < 5; k++) {
+ for (k = 0; k < G_N_ELEMENTS (num_bands_4g[j].band); k++) {
band = num_bands_4g[j].band[k];
for (x = 0; x < G_N_ELEMENTS (band_configuration[i].bands_4g); x++) {
if (band_configuration[i].bands_4g[x] == band) {