From 4b08df42ff069dcf44b8ed206ae33a2904c366ba Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 19 Aug 2011 15:58:24 +0200 Subject: [PATCH] Use simpler rounding up to next multiple of 2. * util.c (printllval): simpler rounding up to next multiple of 2. Signed-off-by: Denys Vlasenko --- util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index 06b12fc4..44f12c2d 100644 --- a/util.c +++ b/util.c @@ -246,7 +246,7 @@ printllval(struct tcb *tcp, const char *format, int llarg) || defined(LINUX_MIPSO32) \ || defined(__ARM_EABI__) /* Align 64bit argument to 64bit boundary. */ - if (llarg % 2) llarg++; + llarg = (llarg + 1) & 0x1e; # endif # if defined LINUX && (defined X86_64 || defined POWERPC64) if (current_personality == 0) { @@ -255,7 +255,7 @@ printllval(struct tcb *tcp, const char *format, int llarg) } else { # ifdef POWERPC64 /* Align 64bit argument to 64bit boundary. */ - if (llarg % 2) llarg++; + llarg = (llarg + 1) & 0x1e; # endif tprintf(format, LONG_LONG(tcp->u_arg[llarg], tcp->u_arg[llarg + 1])); llarg += 2; -- 2.50.1