All of lore.kernel.org
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: qemu-devel@nongnu.org
Cc: kevans@freebsd.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Warner Losh <imp@bsdimp.com>
Subject: [PULL 3/5] bsd-user: style tweak: return is not a function, eliminate ()
Date: Fri, 30 Apr 2021 11:27:44 -0600	[thread overview]
Message-ID: <20210430172746.99818-4-imp@bsdimp.com> (raw)
In-Reply-To: <20210430172746.99818-1-imp@bsdimp.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/bsdload.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 546946b91d..fd14ffa4cd 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload.c
@@ -28,7 +28,7 @@ static int count(char **vec)
         vec++;
     }
 
-    return(i);
+    return i;
 }
 
 static int prepare_binprm(struct linux_binprm *bprm)
@@ -38,15 +38,15 @@ static int prepare_binprm(struct linux_binprm *bprm)
     int retval;
 
     if (fstat(bprm->fd, &st) < 0) {
-        return(-errno);
+        return -errno;
     }
 
     mode = st.st_mode;
     if (!S_ISREG(mode)) {        /* Must be regular file */
-        return(-EACCES);
+        return -EACCES;
     }
     if (!(mode & 0111)) {        /* Must have at least one execute bit set */
-        return(-EACCES);
+        return -EACCES;
     }
 
     bprm->e_uid = geteuid();
@@ -75,10 +75,9 @@ static int prepare_binprm(struct linux_binprm *bprm)
     if (retval < 0) {
         perror("prepare_binprm");
         exit(-1);
-        /* return(-errno); */
     }
     else {
-        return(retval);
+        return retval;
     }
 }
 
@@ -169,5 +168,5 @@ int loader_exec(const char *filename, char **argv, char **envp,
     for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
         g_free(bprm.page[i]);
     }
-    return(retval);
+    return retval;
 }
-- 
2.22.1



  parent reply	other threads:[~2021-04-30 18:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 17:27 [PULL 0/5] bsd-user: minor cleanup patches Warner Losh
2021-04-30 17:27 ` [PULL 1/5] bsd-user: whitespace changes Warner Losh
2021-04-30 17:27 ` [PULL 2/5] bsd-user: style tweak: keyword space ( Warner Losh
2021-04-30 17:27 ` Warner Losh [this message]
2021-04-30 17:27 ` [PULL 4/5] bsd-user: put back a break; that had gone missing Warner Losh
2021-04-30 17:27 ` [PULL 5/5] bsd-user: style tweak: Put {} around all if/else/for statements Warner Losh
2021-05-04 16:04 ` [PULL 0/5] bsd-user: minor cleanup patches Peter Maydell

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=20210430172746.99818-4-imp@bsdimp.com \
    --to=imp@bsdimp.com \
    --cc=kevans@freebsd.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.