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

Unified Diff: fusl/src/ipc/semget.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/ipc/semget.c
diff --git a/fusl/src/ipc/semget.c b/fusl/src/ipc/semget.c
index c4a559db1b0ec1316dc2fa9bc47a538ea552d94a..119662f6ab14bcccb5a1743cee8e5bc45484ad7c 100644
--- a/fusl/src/ipc/semget.c
+++ b/fusl/src/ipc/semget.c
@@ -4,16 +4,16 @@
#include "syscall.h"
#include "ipc.h"
-int semget(key_t key, int n, int fl)
-{
- /* The kernel uses the wrong type for the sem_nsems member
- * of struct semid_ds, and thus might not check that the
- * n fits in the correct (per POSIX) userspace type, so
- * we have to check here. */
- if (n > USHRT_MAX) return __syscall_ret(-EINVAL);
+int semget(key_t key, int n, int fl) {
+ /* The kernel uses the wrong type for the sem_nsems member
+ * of struct semid_ds, and thus might not check that the
+ * n fits in the correct (per POSIX) userspace type, so
+ * we have to check here. */
+ if (n > USHRT_MAX)
+ return __syscall_ret(-EINVAL);
#ifdef SYS_semget
- return syscall(SYS_semget, key, n, fl);
+ return syscall(SYS_semget, key, n, fl);
#else
- return syscall(SYS_ipc, IPCOP_semget, key, n, fl);
+ return syscall(SYS_ipc, IPCOP_semget, key, n, fl);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698