qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-m68k: fix get_mac_extf helper
@ 2016-07-15 15:29 Paolo Bonzini
  2016-07-28 15:31 ` Michael Tokarev
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2016-07-15 15:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

val is assigned twice; the second one should be combined with "|".
Reported by Coverity.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] target-m68k: fix get_mac_extf helper
  2016-07-15 15:29 [Qemu-devel] [PATCH] target-m68k: fix get_mac_extf helper Paolo Bonzini
@ 2016-07-28 15:31 ` Michael Tokarev
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2016-07-28 15:31 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial

15.07.2016 18:29, Paolo Bonzini wrote:
> val is assigned twice; the second one should be combined with "|".
> Reported by Coverity.

Applied to -trivial, thanks!

/mjt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-28 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-15 15:29 [Qemu-devel] [PATCH] target-m68k: fix get_mac_extf helper Paolo Bonzini
2016-07-28 15:31 ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).