trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value
TARGET_BIG_ENDIAN is *always* defined, either as 0 for little endian
targets or as 1 for big endian targets. So we can use this as a value
directly in places that need such a 0 or 1 for some reason, instead
of taking a detour through an additional local variable or something
similar.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/cpu.c b/cpu.c
index 1c948d1..0769b0b 100644
--- a/cpu.c
+++ b/cpu.c
@@ -420,11 +420,7 @@
bool target_words_bigendian(void)
{
-#if TARGET_BIG_ENDIAN
- return true;
-#else
- return false;
-#endif
+ return TARGET_BIG_ENDIAN;
}
const char *target_name(void)