aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2014-03-07 21:00:19 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-26 19:35:33 +0100
commitcc0645b26df92b007e7f4f397607ee235c58172e (patch)
treefb40bae4066b82074c016b2a01ead70c10718e43
parentd0ed9218bc79a25b46023a6cc57aedcda3fc9152 (diff)
sms: Add missing brackets in the relative validity time calculation.
-rw-r--r--src/gsm/gsm0411_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c
index a8ba810..0b543d6 100644
--- a/src/gsm/gsm0411_utils.c
+++ b/src/gsm/gsm0411_utils.c
@@ -138,13 +138,13 @@ static unsigned long gsm340_vp_relative(uint8_t *sms_vp)
vp = *(sms_vp);
if (vp <= 143)
- minutes = vp + 1 * 5;
+ minutes = (vp + 1) * 5;
else if (vp <= 167)
minutes = 12*60 + (vp-143) * 30;
else if (vp <= 196)
- minutes = vp-166 * 60 * 24;
+ minutes = (vp-166) * 60 * 24;
else
- minutes = vp-192 * 60 * 24 * 7;
+ minutes = (vp-192) * 60 * 24 * 7;
return minutes;
}