diff mbox

ISDN:divert: beautify code: useless 'break', 'return (0)', additional comments.

Message ID 515A3674.7090606@asianux.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Chen Gang April 2, 2013, 1:37 a.m. UTC
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(-)

Comments

David Miller April 2, 2013, 6:31 p.m. UTC | #1
From: Chen Gang <gang.chen@asianux.com>
Date: Tue, 02 Apr 2013 09:37:56 +0800

> 
>   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>

Applied.
--
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
diff mbox

Patch

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) {