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

Unified Diff: fusl/src/ipc/semctl.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/semctl.c
diff --git a/fusl/src/ipc/semctl.c b/fusl/src/ipc/semctl.c
index 673a9a8c996b2bd18657b1dff7f6934ec34b2d69..132a267184b166fe1a3740424fff2b85bfd65896 100644
--- a/fusl/src/ipc/semctl.c
+++ b/fusl/src/ipc/semctl.c
@@ -4,25 +4,30 @@
#include "ipc.h"
union semun {
- int val;
- struct semid_ds *buf;
- unsigned short *array;
+ int val;
+ struct semid_ds* buf;
+ unsigned short* array;
};
-int semctl(int id, int num, int cmd, ...)
-{
- union semun arg = {0};
- va_list ap;
- switch (cmd) {
- case SETVAL: case GETALL: case SETALL: case IPC_STAT: case IPC_SET:
- case IPC_INFO: case SEM_INFO: case SEM_STAT:
- va_start(ap, cmd);
- arg = va_arg(ap, union semun);
- va_end(ap);
- }
+int semctl(int id, int num, int cmd, ...) {
+ union semun arg = {0};
+ va_list ap;
+ switch (cmd) {
+ case SETVAL:
+ case GETALL:
+ case SETALL:
+ case IPC_STAT:
+ case IPC_SET:
+ case IPC_INFO:
+ case SEM_INFO:
+ case SEM_STAT:
+ va_start(ap, cmd);
+ arg = va_arg(ap, union semun);
+ va_end(ap);
+ }
#ifdef SYS_semctl
- return syscall(SYS_semctl, id, num, cmd | IPC_64, arg.buf);
+ return syscall(SYS_semctl, id, num, cmd | IPC_64, arg.buf);
#else
- return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | IPC_64, &arg.buf);
+ return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | IPC_64, &arg.buf);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698