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

Side by Side Diff: fusl/src/signal/sigaltstack.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 #include <signal.h> 1 #include <signal.h>
2 #include <errno.h> 2 #include <errno.h>
3 #include "syscall.h" 3 #include "syscall.h"
4 4
5 int sigaltstack(const stack_t *restrict ss, stack_t *restrict old) 5 int sigaltstack(const stack_t* restrict ss, stack_t* restrict old) {
6 { 6 if (ss) {
7 » if (ss) { 7 if (ss->ss_size < MINSIGSTKSZ) {
8 » » if (ss->ss_size < MINSIGSTKSZ) { 8 errno = ENOMEM;
9 » » » errno = ENOMEM; 9 return -1;
10 » » » return -1; 10 }
11 » » } 11 if (ss->ss_flags & ~SS_DISABLE) {
12 » » if (ss->ss_flags & ~SS_DISABLE) { 12 errno = EINVAL;
13 » » » errno = EINVAL; 13 return -1;
14 » » » return -1; 14 }
15 » » } 15 }
16 » } 16 return syscall(SYS_sigaltstack, ss, old);
17 » return syscall(SYS_sigaltstack, ss, old);
18 } 17 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698