[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)
This commit is contained in:
Nico Golde 2010-06-16 15:22:30 +02:00 committed by Harald Welte
parent c8bf3c178f
commit 4df2ad9ac6
1 changed files with 1 additions and 1 deletions

View File

@ -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