diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-09-29 13:01:26 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-09-29 14:56:22 -0500 |
commit | d0501c569458c64fdc76075eaa670e4789a333c7 (patch) | |
tree | 0a613fef020a4678283e97558e3f36415d1488f9 | |
parent | e5f02e427a73a0dd153ccb4173f1ada384593b19 (diff) | |
download | ofono-d0501c569458c64fdc76075eaa670e4789a333c7.tar.bz2 |
Be more numerically stable
-rw-r--r-- | drivers/atmodem/network-registration.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index d6efba23..4100508e 100644 --- a/drivers/atmodem/network-registration.c +++ b/drivers/atmodem/network-registration.c @@ -480,7 +480,7 @@ static inline void report_signal_strength(struct ofono_netreg *netreg, if (strength == 99) strength = -1; else - strength = strength * 100 / 31; + strength = (strength * 100) / 31; ofono_netreg_strength_notify(netreg, strength); } @@ -553,7 +553,7 @@ static void csq_cb(gboolean ok, GAtResult *result, gpointer user_data) if (strength == 99) strength = -1; else - strength = strength * 100 / 31; + strength = (strength * 100) / 31; cb(&error, strength, cbd->data); } |