diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2014-03-07 21:00:19 +0100 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2014-03-16 15:08:54 +0400 |
commit | 36d0feee3abdd6c8d2f645c11e026fcf828224ea (patch) | |
tree | 0081276e5f8c634cf763e42102291a09dd94c345 | |
parent | 93d9a19d6751ee69d3e5c134ffe35519e1b4049b (diff) |
sms: Add missing brackets in the relative validity time calculation.
-rw-r--r-- | src/gsm/gsm0411_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c index e0908efe..b4b51163 100644 --- a/src/gsm/gsm0411_utils.c +++ b/src/gsm/gsm0411_utils.c @@ -132,13 +132,13 @@ static time_t 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; /* Convert to seconds */ return minutes * 60; |