qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>, patches@linaro.org
Subject: [Qemu-devel] [PATCH 1/2] linux-user/syscall.c: Fix indentation in prctl handling
Date: Fri,  3 Feb 2012 13:53:05 +0000	[thread overview]
Message-ID: <1328277186-21665-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1328277186-21665-1-git-send-email-peter.maydell@linaro.org>

Clean up the odd indentation of this switch statement before
we double its size by adding new cases to it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/syscall.c |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2bf9e7e..7851fb5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6842,21 +6842,22 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         goto unimplemented;
 #endif
     case TARGET_NR_prctl:
-        switch (arg1)
-            {
-            case PR_GET_PDEATHSIG:
-                {
-                    int deathsig;
-                    ret = get_errno(prctl(arg1, &deathsig, arg3, arg4, arg5));
-                    if (!is_error(ret) && arg2
-                        && put_user_ual(deathsig, arg2))
-                        goto efault;
-                }
-                break;
-            default:
-                ret = get_errno(prctl(arg1, arg2, arg3, arg4, arg5));
-                break;
+        switch (arg1) {
+        case PR_GET_PDEATHSIG:
+        {
+            int deathsig;
+            ret = get_errno(prctl(arg1, &deathsig, arg3, arg4, arg5));
+            if (!is_error(ret) && arg2
+                && put_user_ual(deathsig, arg2)) {
+                goto efault;
             }
+            break;
+        }
+        default:
+            /* Most prctl options have no pointer arguments */
+            ret = get_errno(prctl(arg1, arg2, arg3, arg4, arg5));
+            break;
+        }
         break;
 #ifdef TARGET_NR_arch_prctl
     case TARGET_NR_arch_prctl:
-- 
1.7.1

  reply	other threads:[~2012-02-03 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 13:53 [Qemu-devel] [PATCH 0/2] linux-user: Support prctl PR_GET/SET_NAME Peter Maydell
2012-02-03 13:53 ` Peter Maydell [this message]
2012-02-03 13:53 ` [Qemu-devel] [PATCH 2/2] linux-user: Add support for prctl PR_GET_NAME and PR_SET_NAME Peter Maydell
2012-02-22 22:55 ` [Qemu-devel] [PATCH 0/2] linux-user: Support prctl PR_GET/SET_NAME Peter Maydell
2012-03-02 21:18   ` Hector Oron
2012-03-08 14:20   ` Peter Maydell
2012-03-20 11:47     ` Peter Maydell
2012-03-21 15:12       ` Riku Voipio

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=1328277186-21665-2-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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 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).