diff mbox

drivers/isdn/divert: beautify code, delete useless 'break'

Message ID 5158E854.7060902@asianux.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Chen Gang April 1, 2013, 1:52 a.m. UTC
delete useless break statements.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 drivers/isdn/divert/isdn_divert.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Comments

Sergei Shtylyov April 1, 2013, 2:04 p.m. UTC | #1
Hello.

On 01-04-2013 5:52, Chen Gang wrote:

>    delete useless break statements.

> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>   drivers/isdn/divert/isdn_divert.c |    2 --
>   1 files changed, 0 insertions(+), 2 deletions(-)

> diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c
> index db432e6..76d505e 100644
> --- a/drivers/isdn/divert/isdn_divert.c
> +++ b/drivers/isdn/divert/isdn_divert.c
> @@ -442,7 +442,6 @@ static int isdn_divert_icall(isdn_ctrl *ic)
>   		switch (dv->rule.action) {
>   		case DEFLECT_IGNORE:
>   			return (0);
> -			break;
>
>   		case DEFLECT_ALERT:
>   		case DEFLECT_PROCEED:
> @@ -511,7 +510,6 @@ static int isdn_divert_icall(isdn_ctrl *ic)
>
>   		default:
>   			return (0); /* ignore call */
> -			break;

    You could have removed stupid () around 0, while at it.

WBR, Sergei

--
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
Chen Gang April 2, 2013, 12:44 a.m. UTC | #2
On 2013年04月01日 22:04, Sergei Shtylyov wrote:
> 
>> diff --git a/drivers/isdn/divert/isdn_divert.c
>> b/drivers/isdn/divert/isdn_divert.c
>> index db432e6..76d505e 100644
>> --- a/drivers/isdn/divert/isdn_divert.c
>> +++ b/drivers/isdn/divert/isdn_divert.c
>> @@ -442,7 +442,6 @@ static int isdn_divert_icall(isdn_ctrl *ic)
>>           switch (dv->rule.action) {
>>           case DEFLECT_IGNORE:
>>               return (0);
>> -            break;
>>
>>           case DEFLECT_ALERT:
>>           case DEFLECT_PROCEED:
>> @@ -511,7 +510,6 @@ static int isdn_divert_icall(isdn_ctrl *ic)
>>
>>           default:
>>               return (0); /* ignore call */
>> -            break;
> 
>    You could have removed stupid () around 0, while at it.

  oh, really, I should do it.

  I will send patch v2 for it

  thanks.

  :-)
diff mbox

Patch

diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c
index db432e6..76d505e 100644
--- a/drivers/isdn/divert/isdn_divert.c
+++ b/drivers/isdn/divert/isdn_divert.c
@@ -442,7 +442,6 @@  static int isdn_divert_icall(isdn_ctrl *ic)
 		switch (dv->rule.action) {
 		case DEFLECT_IGNORE:
 			return (0);
-			break;
 
 		case DEFLECT_ALERT:
 		case DEFLECT_PROCEED:
@@ -511,7 +510,6 @@  static int isdn_divert_icall(isdn_ctrl *ic)
 
 		default:
 			return (0); /* ignore call */
-			break;
 		} /* switch action */
 		break;
 	} /* scan_table */