From 4701fb80b47454c988d6dcaeb86e0e437bb256d5 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sun, 23 Aug 2015 09:06:31 +0800 Subject: [PATCH] code style: convert tabs to spaces --- qemu/target-i386/seg_helper.c | 16 ++++++++-------- uc.c | 30 +++++++++++++++--------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/qemu/target-i386/seg_helper.c b/qemu/target-i386/seg_helper.c index b3f20aa0..0bae3caa 100644 --- a/qemu/target-i386/seg_helper.c +++ b/qemu/target-i386/seg_helper.c @@ -945,15 +945,15 @@ void helper_syscall(CPUX86State *env, int next_eip_addend) #else void helper_syscall(CPUX86State *env, int next_eip_addend) { - // Unicorn: call interrupt callback if registered - struct uc_struct *uc = env->uc; - if (uc->hook_syscall_idx) { - ((uc_cb_insn_syscall_t)uc->hook_callbacks[uc->hook_syscall_idx].callback)( - (uch)uc, uc->hook_callbacks[uc->hook_syscall_idx].user_data); - env->eip += next_eip_addend; - } + // Unicorn: call interrupt callback if registered + struct uc_struct *uc = env->uc; + if (uc->hook_syscall_idx) { + ((uc_cb_insn_syscall_t)uc->hook_callbacks[uc->hook_syscall_idx].callback)( + (uch)uc, uc->hook_callbacks[uc->hook_syscall_idx].user_data); + env->eip += next_eip_addend; + } - return; + return; int selector; diff --git a/uc.c b/uc.c index a73a401b..9cfbeb32 100644 --- a/uc.c +++ b/uc.c @@ -40,10 +40,10 @@ static unsigned int all_arch = 0; static void archs_enable(void) { - static bool initialized = false; + static bool initialized = false; - if (initialized) - return; + if (initialized) + return; #ifdef UNICORN_HAS_ARM all_arch = all_arch + (1 << UC_ARCH_ARM); @@ -64,14 +64,14 @@ static void archs_enable(void) all_arch = all_arch + (1 << UC_ARCH_X86); #endif - initialized = true; + initialized = true; } UNICORN_EXPORT unsigned int uc_version(unsigned int *major, unsigned int *minor) { - archs_enable(); + archs_enable(); if (major != NULL && minor != NULL) { *major = UC_API_MAJOR; @@ -133,18 +133,18 @@ const char *uc_strerror(uc_err code) UNICORN_EXPORT bool uc_support(int query) { - archs_enable(); + archs_enable(); - if (query == UC_ARCH_ALL) - return all_arch == ((1 << UC_ARCH_ARM) | (1 << UC_ARCH_ARM64) | - (1 << UC_ARCH_MIPS) | (1 << UC_ARCH_X86) | - (1 << UC_ARCH_M68K) | (1 << UC_ARCH_SPARC)); + if (query == UC_ARCH_ALL) + return all_arch == ((1 << UC_ARCH_ARM) | (1 << UC_ARCH_ARM64) | + (1 << UC_ARCH_MIPS) | (1 << UC_ARCH_X86) | + (1 << UC_ARCH_M68K) | (1 << UC_ARCH_SPARC)); - if ((unsigned int)query < UC_ARCH_MAX) - return ((all_arch & (1 << query)) != 0); + if ((unsigned int)query < UC_ARCH_MAX) + return ((all_arch & (1 << query)) != 0); - // unsupported query - return false; + // unsupported query + return false; } @@ -153,7 +153,7 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uch *handle) { struct uc_struct *uc; - archs_enable(); + archs_enable(); if (arch < UC_ARCH_MAX) { uc = calloc(1, sizeof(*uc));