diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-12-02 12:52:27 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-12-02 12:52:27 -0600 |
commit | d1a7c63b95454565e1c0bb99fc45d2ae2010060e (patch) | |
tree | 72dead2a71a77c3d77e3a50ca7ef6e9dd5d75732 | |
parent | a67bc1a4b0113cddd96b51711beab4e2316fdc24 (diff) | |
download | ofono-d1a7c63b95454565e1c0bb99fc45d2ae2010060e.tar.bz2 |
network: Go back to the original
The code is a little bit more readable and slightly more efficient this
way
-rw-r--r-- | src/network.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/network.c b/src/network.c index 677b936d..1de54312 100644 --- a/src/network.c +++ b/src/network.c @@ -1698,10 +1698,12 @@ static gboolean sim_spn_parse(const void *data, int length, char **dst) * paragraph as 51.101 and has an Annex B which we implement. */ spn = sim_string_to_utf8(data, length); - if (spn == NULL || strlen(spn) == 0) { - if (spn == NULL) - ofono_error("EFspn read successfully, " - "but couldn't parse"); + if (spn == NULL) { + ofono_error("EFspn read successfully, but couldn't parse"); + return FALSE; + } + + if (strlen(spn) == 0) { g_free(spn); return FALSE; } |