All of lore.kernel.org
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5036] Fix tswap size
Date: Wed, 20 Aug 2008 22:39:26 +0000	[thread overview]
Message-ID: <E1KVwKs-0006Se-Rg@cvs.savannah.gnu.org> (raw)

Revision: 5036
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5036
Author:   malc
Date:     2008-08-20 22:39:26 +0000 (Wed, 20 Aug 2008)

Log Message:
-----------
Fix tswap size

p in this case is uint32_t *

e1/e2 are unsigned ints initialized from arithmetics performed on
unsigned longs

The mistake was, probably, never noticed due to the absence of any
big endian linux-user host. The types e1/e2 and p begs the quesiton
why this function takes longs at all.

Modified Paths:
--------------
    trunk/linux-user/main.c

Modified: trunk/linux-user/main.c
===================================================================
--- trunk/linux-user/main.c	2008-08-20 22:39:24 UTC (rev 5035)
+++ trunk/linux-user/main.c	2008-08-20 22:39:26 UTC (rev 5036)
@@ -278,8 +278,8 @@
     e2 = ((addr >> 16) & 0xff) | (addr & 0xff000000) | (limit & 0x000f0000);
     e2 |= flags;
     p = ptr;
-    p[0] = tswapl(e1);
-    p[1] = tswapl(e2);
+    p[0] = tswap32(e1);
+    p[1] = tswap32(e2);
 }
 
 #if TARGET_X86_64

                 reply	other threads:[~2008-08-20 22:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1KVwKs-0006Se-Rg@cvs.savannah.gnu.org \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.