Be more numerically stable

This commit is contained in:
Denis Kenzior 2009-09-29 13:01:26 -05:00
parent e5f02e427a
commit d0501c5694
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}