Received: from eggs.gnu.org ([2001:4830:134:3::10]:37336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO53Y-00037f-Ng for qemu-devel@nongnu.org; Fri, 15 Jul 2016 11:29:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO53U-0005fs-Lg for qemu-devel@nongnu.org; Fri, 15 Jul 2016 11:29:36 -0400 Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 15 Jul 2016 17:29:22 +0200 Message-Id: <1468596562-28609-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] target-m68k: fix get_mac_extf helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org val is assigned twice; the second one should be combined with "|". Reported by Coverity. Signed-off-by: Paolo Bonzini --- target-m68k/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-m68k/helper.c b/target-m68k/helper.c index f52d0e3..89bbe6d 100644 --- a/target-m68k/helper.c +++ b/target-m68k/helper.c @@ -812,7 +812,7 @@ uint32_t HELPER(get_mac_extf)(CPUM68KState *env, uint32_t acc) { uint32_t val; val = env->macc[acc] & 0x00ff; - val = (env->macc[acc] >> 32) & 0xff00; + val |= (env->macc[acc] >> 32) & 0xff00; val |= (env->macc[acc + 1] << 16) & 0x00ff0000; val |= (env->macc[acc + 1] >> 16) & 0xff000000; return val; -- 2.7.4