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

Side by Side Diff: fusl/src/stat/futimesat.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 <sys/time.h> 2 #include <sys/time.h>
3 #include <sys/stat.h> 3 #include <sys/stat.h>
4 #include <errno.h> 4 #include <errno.h>
5 #include "syscall.h" 5 #include "syscall.h"
6 #include "libc.h" 6 #include "libc.h"
7 7
8 int __futimesat(int dirfd, const char *pathname, const struct timeval times[2]) 8 int __futimesat(int dirfd,
9 { 9 const char* pathname,
10 » struct timespec ts[2]; 10 const struct timeval times[2]) {
11 » if (times) { 11 struct timespec ts[2];
12 » » int i; 12 if (times) {
13 » » for (i=0; i<2; i++) { 13 int i;
14 » » » if (times[i].tv_usec >= 1000000ULL) 14 for (i = 0; i < 2; i++) {
15 » » » » return __syscall_ret(-EINVAL); 15 if (times[i].tv_usec >= 1000000ULL)
16 » » » ts[i].tv_sec = times[i].tv_sec; 16 return __syscall_ret(-EINVAL);
17 » » » ts[i].tv_nsec = times[i].tv_usec * 1000; 17 ts[i].tv_sec = times[i].tv_sec;
18 » » } 18 ts[i].tv_nsec = times[i].tv_usec * 1000;
19 » } 19 }
20 » return utimensat(dirfd, pathname, times ? ts : 0, 0); 20 }
21 return utimensat(dirfd, pathname, times ? ts : 0, 0);
21 } 22 }
22 23
23 weak_alias(__futimesat, futimesat); 24 weak_alias(__futimesat, futimesat);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698