Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Side by Side Diff: fusl/src/time/timegm.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #define _GNU_SOURCE 1 #define _GNU_SOURCE
2 #include "time_impl.h" 2 #include "time_impl.h"
3 #include <errno.h> 3 #include <errno.h>
4 4
5 extern const char __gmt[]; 5 extern const char __gmt[];
6 6
7 time_t timegm(struct tm *tm) 7 time_t timegm(struct tm* tm) {
8 { 8 struct tm new;
9 » struct tm new; 9 long long t = __tm_to_secs(tm);
10 » long long t = __tm_to_secs(tm); 10 if (__secs_to_tm(t, &new) < 0) {
11 » if (__secs_to_tm(t, &new) < 0) { 11 errno = EOVERFLOW;
12 » » errno = EOVERFLOW; 12 return -1;
13 » » return -1; 13 }
14 » } 14 *tm = new;
15 » *tm = new; 15 tm->tm_isdst = 0;
16 » tm->tm_isdst = 0; 16 tm->__tm_gmtoff = 0;
17 » tm->__tm_gmtoff = 0; 17 tm->__tm_zone = __gmt;
18 » tm->__tm_zone = __gmt; 18 return t;
19 » return t;
20 } 19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698