From 43126f9798858c213f796877eb62086864045059 Mon Sep 17 00:00:00 2001 From: Simon Zuckerbraun Date: Tue, 2 Apr 2024 16:25:55 -0500 Subject: [PATCH] Correct style --- bindings/gumjs/gumquickcore.c | 4 ++-- bindings/gumjs/gumv8core.h | 8 +++---- tests/gumjs/script.c | 44 +++++++++++++++++------------------ 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/bindings/gumjs/gumquickcore.c b/bindings/gumjs/gumquickcore.c index caa22f557..0d1da0930 100644 --- a/bindings/gumjs/gumquickcore.c +++ b/bindings/gumjs/gumquickcore.c @@ -4449,7 +4449,7 @@ gum_quick_native_callback_invoke (ffi_cif * cif, JSValue result; gint saved_system_error; - saved_system_error = gum_thread_get_system_error(); + saved_system_error = gum_thread_get_system_error (); #if defined (HAVE_I386) && defined (_MSC_VER) return_address = GPOINTER_TO_SIZE (_ReturnAddress ()); @@ -4560,7 +4560,7 @@ gum_quick_native_callback_invoke (ffi_cif * cif, _gum_quick_scope_leave (&scope); - gum_thread_set_system_error(saved_system_error); + gum_thread_set_system_error (saved_system_error); } GUMJS_DEFINE_FINALIZER (gumjs_callback_context_finalize) diff --git a/bindings/gumjs/gumv8core.h b/bindings/gumjs/gumv8core.h index 6730fd14b..662a84939 100644 --- a/bindings/gumjs/gumv8core.h +++ b/bindings/gumjs/gumv8core.h @@ -186,14 +186,14 @@ G_GNUC_INTERNAL void _gum_v8_core_push_job (GumV8Core * self, class GumV8SystemErrorPreservationScope { public: - GumV8SystemErrorPreservationScope() - : saved_error(gum_thread_get_system_error()) + GumV8SystemErrorPreservationScope () + : saved_error (gum_thread_get_system_error ()) { } - ~GumV8SystemErrorPreservationScope() + ~GumV8SystemErrorPreservationScope () { - gum_thread_set_system_error(saved_error); + gum_thread_set_system_error (saved_error); } private: diff --git a/tests/gumjs/script.c b/tests/gumjs/script.c index c378aca3e..791efbaf3 100644 --- a/tests/gumjs/script.c +++ b/tests/gumjs/script.c @@ -6991,21 +6991,21 @@ TESTCASE (system_error_can_be_replaced_from_replacement_function) #endif } -TESTCASE(system_error_unaffected_by_replacement_function_if_assigned_original_value) +TESTCASE (system_error_unaffected_by_replacement_function_if_assigned_original_value) { #ifdef HAVE_WINDOWS - COMPILE_AND_LOAD_SCRIPT( + COMPILE_AND_LOAD_SCRIPT ( "Interceptor.replace(" GUM_PTR_CONST "," " new NativeCallback(function (arg) {" " this.lastError = 1337;" " return 0;" "}, 'int', ['int']));", target_function_int); - SetLastError(1337); - target_function_int(7); - g_assert_cmpint(GetLastError(), == , 1337); + SetLastError (1337); + target_function_int (7); + g_assert_cmpint (GetLastError (), == , 1337); #else - COMPILE_AND_LOAD_SCRIPT( + COMPILE_AND_LOAD_SCRIPT ( "Interceptor.replace(" GUM_PTR_CONST "," " new NativeCallback(function (arg) {" " this.errno = 1337;" @@ -7013,26 +7013,26 @@ TESTCASE(system_error_unaffected_by_replacement_function_if_assigned_original_va "}, 'int', ['int']));", target_function_int); errno = 1337; - target_function_int(7); - g_assert_cmpint(errno, == , 1337); + target_function_int (7); + g_assert_cmpint (errno, == , 1337); #endif } -TESTCASE(system_error_unaffected_by_replacement_function_if_untouched) +TESTCASE (system_error_unaffected_by_replacement_function_if_untouched) { - COMPILE_AND_LOAD_SCRIPT( + COMPILE_AND_LOAD_SCRIPT ( "Interceptor.replace(" GUM_PTR_CONST "," " new NativeCallback(function (arg) {" " return 0;" "}, 'int', ['int']));", target_function_int); #ifdef HAVE_WINDOWS - SetLastError(1337); - target_function_int(7); - g_assert_cmpint(GetLastError(), == , 1337); + SetLastError (1337); + target_function_int (7); + g_assert_cmpint (GetLastError (), == , 1337); #else errno = 1337; - target_function_int(7); - g_assert_cmpint(errno, == , 1337); + target_function_int (7); + g_assert_cmpint (errno, == , 1337); #endif } @@ -10243,9 +10243,9 @@ TESTCASE (cmodule_should_provide_access_to_system_error) g_assert_cmpint (gum_thread_get_system_error (), ==, 2); } -TESTCASE(system_error_unaffected_by_native_callback_from_cmodule) +TESTCASE (system_error_unaffected_by_native_callback_from_cmodule) { - COMPILE_AND_LOAD_SCRIPT( + COMPILE_AND_LOAD_SCRIPT ( "const cm = new CModule(`\\n" " #include \\n" " extern void nativeCallback1();\\n" @@ -10260,13 +10260,13 @@ TESTCASE(system_error_unaffected_by_native_callback_from_cmodule) "Interceptor.replace(" GUM_PTR_CONST ",\n" " cm.replacement);", target_function_int); #ifdef HAVE_WINDOWS - SetLastError(1337); - target_function_int(7); - g_assert_cmpint(GetLastError(), == , 1337); + SetLastError (1337); + target_function_int (7); + g_assert_cmpint (GetLastError (), == , 1337); #else errno = 1337; - target_function_int(7); - g_assert_cmpint(errno, == , 1337); + target_function_int (7); + g_assert_cmpint (errno, == , 1337); #endif }