lkml.org 
[lkml]   [2015]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 6/6] qlcnic_dcb.c : possible division by zero.
From
From: Ameen Ali <ameenali023@gmail.com>
Date: Wed, 25 Feb 2015 23:56:43 +0200

> @@ -822,7 +822,7 @@ qlcnic_dcb_get_pg_tc_cfg_tx(struct net_device *netdev, int tc, u8 *prio,
> if (temp->valid && (pg == temp->pgid))
> cnt++;
> }
> -
> + if(cnt != 0)
> tc_cfg->bwg_percent = (100 / cnt);

This is not acceptable.

Your conditional expression is not spaced properly, there must be a space
between "if" and the openning parenthesis of the condition.

You also must properly re-indent the statement the new if() condition
is protecting.


\
 
 \ /
  Last update: 2015-02-25 23:21    [W:0.748 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site