You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2021/01/10 10:10:18 UTC

[incubator-nuttx] branch master updated: arch/sim: Simplify SYMBOL macro definition

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new fbc6891  arch/sim: Simplify SYMBOL macro definition
fbc6891 is described below

commit fbc68912b9812e63e3670af7dfd511361ec696e5
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jan 10 00:05:43 2021 -0800

    arch/sim: Simplify SYMBOL macro definition
    
    Change-Id: I1772b65b9bbe29917885e432056f84921b562eb0
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/sim/up_setjmp32.S | 4 +---
 arch/sim/src/sim/up_setjmp64.S | 5 +----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/sim/src/sim/up_setjmp32.S b/arch/sim/src/sim/up_setjmp32.S
index c135849..6d85835 100644
--- a/arch/sim/src/sim/up_setjmp32.S
+++ b/arch/sim/src/sim/up_setjmp32.S
@@ -45,13 +45,11 @@
 
 #ifdef __CYGWIN__
 # define SYMBOL(s) _##s
-#else
-#ifdef __ELF__
+#elif defined(__ELF__)
 # define SYMBOL(s) s
 #else
 # define SYMBOL(s) _##s
 #endif
-#endif
 
 /**************************************************************************
  * Public Functions
diff --git a/arch/sim/src/sim/up_setjmp64.S b/arch/sim/src/sim/up_setjmp64.S
index fc50919..5ce5f1d 100644
--- a/arch/sim/src/sim/up_setjmp64.S
+++ b/arch/sim/src/sim/up_setjmp64.S
@@ -78,15 +78,12 @@
 #endif
 
 #ifdef __CYGWIN__
-//# define SYMBOL(s) _##s
 # define SYMBOL(s) s
-#else
-#ifdef __ELF__
+#elif defined(__ELF__)
 # define SYMBOL(s) s
 #else
 # define SYMBOL(s) _##s
 #endif
-#endif
 
 /**************************************************************************
  * Public Functions