public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Vadim Lobanov <vlobanov@speakeasy.net>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Unify sys_tkill() and sys_tgkill()
Date: Sat, 24 Sep 2005 16:52:28 +0200	[thread overview]
Message-ID: <9a8748490509240752436ef7b2@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0509231913550.5348@shell3.speakeasy.net>

On 9/24/05, Vadim Lobanov <vlobanov@speakeasy.net> wrote:
> Hi,
>
> The majority of the sys_tkill() and sys_tgkill() function code is
> duplicated between the two of them. This patch pulls the duplication out
> into a separate function -- do_tkill() -- and lets sys_tkill() and
> sys_tgkill() be simple wrappers around it. This should make it easier to
> maintain in light of future changes.
>

A few nitpicks ... :

[snip]
> +static int do_tkill(int tgid, int pid, int sig)

I would probably have made this

  static inline int do_tkill(int tgid, int pid, int sig)


[snip]
> +       if (p && ((tgid <= 0) || (p->tgid == tgid))) {

Why all the extra parenthesis?

   if (p && (tgid <= 0 || p->tgid == tgid)) {


[snip]
> +       return (do_tkill(tgid, pid, sig));

return is not a function

   return do_tkill(tgid, pid, sig);

[snip]
> +       return (do_tkill(0, pid, sig));

again, get rid of the pointless extra parens

   return do_tkill(0, pid, sig);


--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2005-09-24 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-24  2:18 [PATCH] Unify sys_tkill() and sys_tgkill() Vadim Lobanov
2005-09-24 14:52 ` Jesper Juhl [this message]
2005-09-24 16:03   ` Serious time drift - clock running fast Howard Chu
2005-09-24 16:38   ` [PATCH] Unify sys_tkill() and sys_tgkill() Jörn Engel
2005-09-24 19:15     ` Jesper Juhl
2005-09-24 17:47   ` Vadim Lobanov

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=9a8748490509240752436ef7b2@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vlobanov@speakeasy.net \
    /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