commit 618cebeff82ae775308eb29d7891e22861411e21
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date: Thu Nov 13 10:42:31 2014 +0100
S/390: Get rid of warning: the comparision will always evaluate as false.
diff --git a/sysdeps/s390/s390-32/backtrace.c b/sysdeps/s390/s390-32/backtrace.c
index 1dbe37eeb6f6db08..0db076804895e200 100644
--- a/sysdeps/s390/s390-32/backtrace.c
+++ b/sysdeps/s390/s390-32/backtrace.c
@@ -77,10 +77,6 @@ init (void)
if (unwind_getip == NULL)
unwind_backtrace = NULL;
}
-#else
-# define unwind_backtrace _Unwind_Backtrace
-# define unwind_getip _Unwind_GetIP
-#endif
static int
__backchain_backtrace (void **array, int size)
@@ -107,6 +103,10 @@ __backchain_backtrace (void **array, int size)
return cnt;
}
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
static _Unwind_Reason_Code
backtrace_helper (struct _Unwind_Context *ctx, void *a)
@@ -130,9 +130,10 @@ __backtrace (void **array, int size)
__libc_once_define (static, once);
__libc_once (once, init);
-#endif
+
if (unwind_backtrace == NULL)
return __backchain_backtrace (array, size);
+#endif
if (size >= 1)
unwind_backtrace (backtrace_helper, &arg);
diff --git a/sysdeps/s390/s390-64/backtrace.c b/sysdeps/s390/s390-64/backtrace.c
index 562d461f97ad5bca..548d312f3cc05151 100644
--- a/sysdeps/s390/s390-64/backtrace.c
+++ b/sysdeps/s390/s390-64/backtrace.c
@@ -76,12 +76,8 @@ init (void)
if (unwind_getip == NULL)
unwind_backtrace = NULL;
}
-#else
-# define unwind_backtrace _Unwind_Backtrace
-# define unwind_getip _Unwind_GetIP
-#endif
-int
+static int
__backchain_backtrace (void **array, int size)
{
/* We assume that all the code is generated with frame pointers set. */
@@ -106,6 +102,10 @@ __backchain_backtrace (void **array, int size)
return cnt;
}
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
static _Unwind_Reason_Code
backtrace_helper (struct _Unwind_Context *ctx, void *a)
@@ -129,9 +129,10 @@ __backtrace (void **array, int size)
__libc_once_define (static, once);
__libc_once (once, init);
-#endif
+
if (unwind_backtrace == NULL)
return __backchain_backtrace (array, size);
+#endif
if (size >= 1)
unwind_backtrace (backtrace_helper, &arg);