]> granicus.if.org Git - strace/commitdiff
Use simpler rounding up to next multiple of 2.
authorDenys Vlasenko <dvlasenk@redhat.com>
Fri, 19 Aug 2011 13:58:24 +0000 (15:58 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 23 Aug 2011 10:53:01 +0000 (12:53 +0200)
* util.c (printllval): simpler rounding up to next multiple of 2.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
util.c

diff --git a/util.c b/util.c
index 06b12fc4cf68cf0de257e6031c10c4e6a0d387fb..44f12c2d520ec2ea4a1c193ed7082563c3f417df 100644 (file)
--- 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;