summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index e88e5c57..56ca924d 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1247,11 +1247,11 @@ static void sim_pnn_read_cb(struct ofono_modem *modem, int ok,
if (length < 3 || record_length < 3 || length < record_length)
return;
+ total = length / record_length;
+
if (!netreg->eons)
netreg->eons = sim_eons_new(total);
- total = length / record_length;
-
sim_eons_add_pnn_record(netreg->eons, record, data, record_length);
/* If PNN is not present then OPL is not useful, don't