diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-10-11 20:40:16 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-10-13 05:04:46 -0500 |
commit | b750de3ec6d0755adff676e7a9baf817500043e6 (patch) | |
tree | a13dd89ea9484ad1f7d938ca1283fdb052184660 /src | |
parent | 920ee13a2b439923bb5a8e35115fc196f6499810 (diff) | |
download | ofono-b750de3ec6d0755adff676e7a9baf817500043e6.tar.bz2 |
sim: Don't re-check for id != 0
We already check the id is valid in the get_icon function, there's no
reason to re-check it.
Diffstat (limited to 'src')
-rw-r--r-- | src/sim.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -826,14 +826,6 @@ static void sim_get_image(struct ofono_sim *sim, unsigned char id, unsigned char *efimg; char *image; - /* icon ids should start at 1, our array starts at zero */ - if (id == 0) { - sim_get_image_cb(0, NULL, 0, user_data); - return; - } - - id--; - image = sim_fs_get_cached_image(sim->simfs, id); if (image == NULL) @@ -901,7 +893,7 @@ static DBusMessage *sim_get_icon(DBusConnection *conn, sim->pending = dbus_message_ref(msg); - sim_get_image(sim, id, sim); + sim_get_image(sim, id - 1, sim); return NULL; } |