All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	isdn@linux-pingi.de, Jiri Slaby <jslaby@suse.cz>,
	'Jiri Kosina' <trivial@kernel.org>,
	tilman@imap.cc
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org >> netdev" <netdev@vger.kernel.org>
Subject: [PATCH] ISDN:divert: beautify code: useless 'break', 'return (0)', additional comments.
Date: Tue, 02 Apr 2013 09:37:56 +0800	[thread overview]
Message-ID: <515A3674.7090606@asianux.com> (raw)
In-Reply-To: <515993E1.5010508@cogentembedded.com>


  delete useless 'break' after 'return'.
  let 'return 0' instead of 'return (0)'
  also give a comment for 'break' to let readers notice it.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
 drivers/isdn/divert/isdn_divert.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c
index db432e6..50749a7 100644
--- a/drivers/isdn/divert/isdn_divert.c
+++ b/drivers/isdn/divert/isdn_divert.c
@@ -441,8 +441,7 @@ static int isdn_divert_icall(isdn_ctrl *ic)
 
 		switch (dv->rule.action) {
 		case DEFLECT_IGNORE:
-			return (0);
-			break;
+			return 0;
 
 		case DEFLECT_ALERT:
 		case DEFLECT_PROCEED:
@@ -510,10 +509,9 @@ static int isdn_divert_icall(isdn_ctrl *ic)
 			break;
 
 		default:
-			return (0); /* ignore call */
-			break;
+			return 0; /* ignore call */
 		} /* switch action */
-		break;
+		break; /* will break the 'for' looping */
 	} /* scan_table */
 
 	if (cs) {
-- 
1.7.7.6

  parent reply	other threads:[~2013-04-02  1:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  1:52 [PATCH] drivers/isdn/divert: beautify code, delete useless 'break' Chen Gang
2013-04-01 14:04 ` Sergei Shtylyov
2013-04-02  0:44   ` Chen Gang
2013-04-02  1:37   ` Chen Gang [this message]
2013-04-02 18:31     ` [PATCH] ISDN:divert: beautify code: useless 'break', 'return (0)', additional comments David Miller

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=515A3674.7090606@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=davem@davemloft.net \
    --cc=isdn@linux-pingi.de \
    --cc=jslaby@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=tilman@imap.cc \
    --cc=trivial@kernel.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.