diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-05-19 23:47:41 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-05-19 23:47:41 -0500 |
commit | bbd6a1d48abff5ae9137ba37e469c2e698e8c244 (patch) | |
tree | b9237eb22ab5b05ad52d9ee45ba7a9d285ea746e | |
parent | b338033307fde3f7a12b5acc26cb09588ed65a53 (diff) | |
download | ofono-bbd6a1d48abff5ae9137ba37e469c2e698e8c244.tar.bz2 |
sim: No need for this define
-rw-r--r-- | include/types.h | 2 | ||||
-rw-r--r-- | src/sim.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/types.h b/include/types.h index adaf319b..2b154f00 100644 --- a/include/types.h +++ b/include/types.h @@ -36,8 +36,6 @@ extern "C" { typedef int ofono_bool_t; -#define OFONO_MAX_ICCID_LENGTH 20 - /* MCC is always three digits. MNC is either two or three digits */ #define OFONO_MAX_MCC_LENGTH 3 #define OFONO_MAX_MNC_LENGTH 3 @@ -1304,13 +1304,13 @@ static void sim_iccid_read_cb(int ok, int length, int record, struct ofono_sim *sim = userdata; const char *path = __ofono_atom_get_path(sim->atom); DBusConnection *conn = ofono_dbus_get_connection(); - char iccid[OFONO_MAX_ICCID_LENGTH + 1]; + char iccid[21]; /* ICCID max length is 20 + 1 for NULL */ if (!ok || length < 10) return; extract_bcd_number(data, length, iccid); - iccid[OFONO_MAX_ICCID_LENGTH] = '\0'; + iccid[20] = '\0'; sim->iccid = g_strdup(iccid); ofono_dbus_signal_property_changed(conn, path, |