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

Unified Diff: fusl/src/linux/adjtime.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 side-by-side diff with in-line comments
Download patch
Index: fusl/src/linux/adjtime.c
diff --git a/fusl/src/linux/adjtime.c b/fusl/src/linux/adjtime.c
index fa8af9f021773f575989fb34b872699434cfe4cf..02a9abf4227cbc5660ab0a7436ecc8b22367b766 100644
--- a/fusl/src/linux/adjtime.c
+++ b/fusl/src/linux/adjtime.c
@@ -4,24 +4,24 @@
#include <errno.h>
#include "syscall.h"
-int adjtime(const struct timeval *in, struct timeval *out)
-{
- struct timex tx = { 0 };
- if (in) {
- if (in->tv_sec > 1000 || in->tv_usec > 1000000000) {
- errno = EINVAL;
- return -1;
- }
- tx.offset = in->tv_sec*1000000 + in->tv_usec;
- tx.modes = ADJ_OFFSET_SINGLESHOT;
- }
- if (syscall(SYS_adjtimex, &tx) < 0) return -1;
- if (out) {
- out->tv_sec = tx.offset / 1000000;
- if ((out->tv_usec = tx.offset % 1000000) < 0) {
- out->tv_sec--;
- out->tv_usec += 1000000;
- }
- }
- return 0;
+int adjtime(const struct timeval* in, struct timeval* out) {
+ struct timex tx = {0};
+ if (in) {
+ if (in->tv_sec > 1000 || in->tv_usec > 1000000000) {
+ errno = EINVAL;
+ return -1;
+ }
+ tx.offset = in->tv_sec * 1000000 + in->tv_usec;
+ tx.modes = ADJ_OFFSET_SINGLESHOT;
+ }
+ if (syscall(SYS_adjtimex, &tx) < 0)
+ return -1;
+ if (out) {
+ out->tv_sec = tx.offset / 1000000;
+ if ((out->tv_usec = tx.offset % 1000000) < 0) {
+ out->tv_sec--;
+ out->tv_usec += 1000000;
+ }
+ }
+ return 0;
}

Powered by Google App Engine
This is Rietveld 408576698