aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_11.c
diff options
context:
space:
mode:
authorNico Golde <nico@ngolde.de>2010-06-16 15:22:30 +0200
committerHarald Welte <laforge@gnumonks.org>2010-06-21 13:51:28 +0200
commit4df2ad9ac6153b2104dcb3e1ae0d27e44125b32e (patch)
tree88b38f3ad50f69b21013c401489ac55d44f6f3ad /openbsc/src/gsm_04_11.c
parentc8bf3c178f7f43831cf44a28a10031987f74ba89 (diff)
[SMS] avoid mktime on NULL
gmtime(NULL) returns NULL at least in glibc and *can not* be used as time(NULL). Since we compare two time_t values when checking the validity period this can be replaced by time(NULL)
Diffstat (limited to 'openbsc/src/gsm_04_11.c')
-rw-r--r--openbsc/src/gsm_04_11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_11.c b/openbsc/src/gsm_04_11.c
index 1a17dd94..d4df989d 100644
--- a/openbsc/src/gsm_04_11.c
+++ b/openbsc/src/gsm_04_11.c
@@ -305,7 +305,7 @@ static unsigned long gsm340_vp_absolute(u_int8_t *sms_vp)
unsigned long minutes;
expires = gsm340_scts(sms_vp);
- now = mktime(gmtime(NULL));
+ now = time(NULL);
if (expires <= now)
minutes = 0;
else