X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=lib%2Fcrtdll%2Fsys_stat%2Fftime.c;fp=lib%2Fcrtdll%2Fsys_stat%2Fftime.c;h=6b2dd6c018d946e0741ca7b9b55d2eb14268acbe;hp=c78ad444543ebfc034fa675bc975751079be153b;hb=e3ed2d773259cc445c7ff8181ebd934931365328;hpb=d378c68f5a9bb25c9e671dacd482d2e25d211df3 diff --git a/lib/crtdll/sys_stat/ftime.c b/lib/crtdll/sys_stat/ftime.c index c78ad44..6b2dd6c 100644 --- a/lib/crtdll/sys_stat/ftime.c +++ b/lib/crtdll/sys_stat/ftime.c @@ -16,32 +16,31 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include + + // crtdll has void return type instead of int -void -_ftime (timebuf) - struct timeb *timebuf; +void _ftime(struct timeb* timebuf) { - int save = errno; - struct tm *tp; - - __set_errno (0); - if (time (&timebuf->time) == (time_t) -1 && errno != 0) - return; - timebuf->millitm = 0; - tp = localtime(&timebuf->time); - if (tp == NULL) + int save = errno; + struct tm* tp; + + __set_errno (0); + if (time (&timebuf->time) == (time_t) -1 && errno != 0) + return; + timebuf->millitm = 0; + tp = localtime(&timebuf->time); + if (tp == NULL) + return; + + timebuf->_timezone = tp->tm_gmtoff / 60; + timebuf->dstflag = tp->tm_isdst; + + free(tp); + __set_errno(save); return; - - timebuf->_timezone = tp->tm_gmtoff / 60; - timebuf->dstflag = tp->tm_isdst; - - free(tp); - __set_errno (save); - return; } -