mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Voidify getfilesystemtime() (GH-15413)
The function always returned 0, and the return values was never used, so we declare it to return void. While we're at it, we also fix the space indentation of the comment.
This commit is contained in:
parent
059fe6c28b
commit
ec2655f88b
1 changed files with 2 additions and 4 deletions
|
@ -23,7 +23,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "php_win32_globals.h"
|
#include "php_win32_globals.h"
|
||||||
|
|
||||||
static zend_always_inline int getfilesystemtime(struct timeval *tv)
|
static zend_always_inline void getfilesystemtime(struct timeval *tv)
|
||||||
{/*{{{*/
|
{/*{{{*/
|
||||||
FILETIME ft;
|
FILETIME ft;
|
||||||
unsigned __int64 ff = 0;
|
unsigned __int64 ff = 0;
|
||||||
|
@ -31,7 +31,7 @@ static zend_always_inline int getfilesystemtime(struct timeval *tv)
|
||||||
|
|
||||||
GetSystemTimePreciseAsFileTime(&ft);
|
GetSystemTimePreciseAsFileTime(&ft);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do not cast a pointer to a FILETIME structure to either a
|
* Do not cast a pointer to a FILETIME structure to either a
|
||||||
* ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows.
|
* ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows.
|
||||||
* via http://technet.microsoft.com/en-us/library/ms724284(v=vs.85).aspx
|
* via http://technet.microsoft.com/en-us/library/ms724284(v=vs.85).aspx
|
||||||
|
@ -45,8 +45,6 @@ static zend_always_inline int getfilesystemtime(struct timeval *tv)
|
||||||
|
|
||||||
tv->tv_sec = (long)(ff / 1000000Ui64);
|
tv->tv_sec = (long)(ff / 1000000Ui64);
|
||||||
tv->tv_usec = (long)(ff % 1000000Ui64);
|
tv->tv_usec = (long)(ff % 1000000Ui64);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}/*}}}*/
|
}/*}}}*/
|
||||||
|
|
||||||
PHPAPI int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info)
|
PHPAPI int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue