[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:
parent
c8bf3c178f
commit
4df2ad9ac6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue