Skip to content

Commit fcb8ade

Browse files
committed
format
1 parent 1348627 commit fcb8ade

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

system/lib/compiler-rt/emscripten_setjmp.c

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,19 @@ uint32_t __wasm_setjmp_test(void* env, void* func_invocation_id) {
109109
}
110110

111111
#ifdef __USING_WASM_SJLJ__
112-
void
113-
__wasm_longjmp(void *env, int val)
114-
{
115-
struct jmp_buf_impl *jb = env;
116-
struct __WasmLongjmpArgs *arg = &jb->arg;
117-
/*
118-
* C standard says:
119-
* The longjmp function cannot cause the setjmp macro to return
120-
* the value 0; if val is 0, the setjmp macro returns the value 1.
121-
*/
122-
if (val == 0) {
123-
val = 1;
124-
}
125-
arg->env = env;
126-
arg->val = val;
127-
__builtin_wasm_throw(1, arg); /* 1 == C_LONGJMP */
112+
void __wasm_longjmp(void* env, int val) {
113+
struct jmp_buf_impl* jb = env;
114+
struct __WasmLongjmpArgs* arg = &jb->arg;
115+
/*
116+
* C standard says:
117+
* The longjmp function cannot cause the setjmp macro to return
118+
* the value 0; if val is 0, the setjmp macro returns the value 1.
119+
*/
120+
if (val == 0) {
121+
val = 1;
122+
}
123+
arg->env = env;
124+
arg->val = val;
125+
__builtin_wasm_throw(1, arg); /* 1 == C_LONGJMP */
128126
}
129127
#endif

0 commit comments

Comments
 (0)