public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat•com>
To: Jean Sacren <sakiwit@gmail•com>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH net-next 2/3] netdevice: remove useless else keyword
Date: Tue, 06 Aug 2013 10:20:47 +0200	[thread overview]
Message-ID: <5200B1DF.2000701@redhat.com> (raw)
In-Reply-To: <1375774371-831-2-git-send-email-sakiwit@gmail.com>

On 08/06/2013 09:32 AM, Jean Sacren wrote:
> Clean up multiple useless else keywords. Add empty lines for
> readability.

Hmm, don't really think this is actually needed or makes things better.

> Signed-off-by: Jean Sacren <sakiwit@gmail•com>
> ---
>   net/core/dev.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 58eb802..1b0bea8 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -1062,9 +1062,11 @@ static int dev_get_valid_name(struct net *net,
>
>   	if (strchr(name, '%'))
>   		return dev_alloc_name_ns(net, dev, name);
> -	else if (__dev_get_by_name(net, name))
> +
> +	if (__dev_get_by_name(net, name))
>   		return -EEXIST;
> -	else if (dev->name != name)
> +
> +	if (dev->name != name)
>   		strlcpy(dev->name, name, IFNAMSIZ);
>
>   	return 0;
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2013-08-06  8:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06  7:32 [PATCH net-next 1/3] sock: fix a typo in the comment Jean Sacren
2013-08-06  7:32 ` [PATCH net-next 2/3] netdevice: remove useless else keyword Jean Sacren
2013-08-06  8:20   ` Daniel Borkmann [this message]
2013-08-06 14:37     ` Joe Perches
2013-08-06  7:32 ` [PATCH net-next 3/3] net: core: fix wrong linkage for ptype_base and ptype_all symbols Jean Sacren
2013-08-06  8:13   ` Daniel Borkmann
2013-08-06 20:45     ` Jean Sacren
2013-08-06 21:06       ` Eric Dumazet
2013-08-07  4:00         ` Jean Sacren

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=5200B1DF.2000701@redhat.com \
    --to=dborkman@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sakiwit@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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