From 1b145f431b610bb76d19813f886f6471fb9ef27a Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Thu, 10 Dec 2015 00:53:48 +0800 Subject: [PATCH] code style --- samples/mem_apis.c | 15 +++++++-------- samples/sample_arm.c | 15 +++++++-------- samples/sample_arm64.c | 15 +++++++-------- samples/sample_m68k.c | 15 +++++++-------- samples/sample_mips.c | 15 +++++++-------- samples/sample_sparc.c | 15 +++++++-------- samples/sample_x86.c | 15 +++++++-------- samples/shellcode.c | 15 +++++++-------- 8 files changed, 56 insertions(+), 64 deletions(-) diff --git a/samples/mem_apis.c b/samples/mem_apis.c index b9356aff..0d933baa 100644 --- a/samples/mem_apis.c +++ b/samples/mem_apis.c @@ -361,14 +361,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif nx_test(); diff --git a/samples/sample_arm.c b/samples/sample_arm.c index 96d031f9..97c69da4 100644 --- a/samples/sample_arm.c +++ b/samples/sample_arm.c @@ -153,14 +153,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif test_arm(); diff --git a/samples/sample_arm64.c b/samples/sample_arm64.c index b1e85cf2..ae89f5fe 100644 --- a/samples/sample_arm64.c +++ b/samples/sample_arm64.c @@ -100,14 +100,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif test_arm64(); diff --git a/samples/sample_m68k.c b/samples/sample_m68k.c index 204e503d..b75d3af0 100644 --- a/samples/sample_m68k.c +++ b/samples/sample_m68k.c @@ -162,14 +162,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif test_m68k(); diff --git a/samples/sample_mips.c b/samples/sample_mips.c index 578c688e..428b327f 100644 --- a/samples/sample_mips.c +++ b/samples/sample_mips.c @@ -147,14 +147,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif test_mips_eb(); diff --git a/samples/sample_sparc.c b/samples/sample_sparc.c index 1445e9d7..a8f1a1e3 100644 --- a/samples/sample_sparc.c +++ b/samples/sample_sparc.c @@ -102,14 +102,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif test_sparc(); diff --git a/samples/sample_x86.c b/samples/sample_x86.c index fe8b1b5f..6f8802cf 100644 --- a/samples/sample_x86.c +++ b/samples/sample_x86.c @@ -814,14 +814,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif if (argc == 2) { diff --git a/samples/shellcode.c b/samples/shellcode.c index 234b361f..9476a770 100644 --- a/samples/shellcode.c +++ b/samples/shellcode.c @@ -159,14 +159,13 @@ int main(int argc, char **argv, char **envp) { // dynamically load shared library #ifdef DYNLOAD - if( !uc_dyn_load(NULL, 0) ) - { - printf("Error dynamically loading shared library.\n"); - printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); - printf("any other dependent dll/so files.\n"); - printf("The easiest way is to place them in the same directory as this app.\n"); - return 1; - } + if (!uc_dyn_load(NULL, 0)) { + printf("Error dynamically loading shared library.\n"); + printf("Please check that unicorn.dll/unicorn.so is available as well as\n"); + printf("any other dependent dll/so files.\n"); + printf("The easiest way is to place them in the same directory as this app.\n"); + return 1; + } #endif if (argc == 2) {