[PATCH 2/5] staging: vt6656: 80211mgr.c: Code cleanup, removed return of void funcs.

Dan Carpenter dan.carpenter at oracle.com
Wed Nov 30 13:52:30 UTC 2011


On Wed, Nov 30, 2011 at 12:23:50AM -0200, Marcos Paulo de Souza wrote:
> Removed return call of void functions. Removed some code style issues.
> 

It was bad luck to do the code style changes.

> @@ -491,10 +477,8 @@ vMgrDecodeAssocResponse(
>      if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
>          pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
>          DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem);
> -    } else {
> +	} else
>          pFrame->pExtSuppRates = NULL;
> -    }

When one side of the if else gets curly braces, then the other side
gets it as well.

> @@ -578,10 +560,9 @@ vMgrDecodeReassocRequest(
>                  pFrame->pRSN = (PWLAN_IE_RSN)pItem;
>              break;
>          case WLAN_EID_RSN_WPA:
> -            if (pFrame->pRSNWPA == NULL) {
> +		if (pFrame->pRSNWPA == NULL)
>                  if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE)
>                      pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
> -            }

Leave the curly braces for multi-line indents even when they are not
needed for semantic reasons.  It's easier to read.

regards,
dan carpenter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20111130/0e7e15c8/attachment.asc>


More information about the devel mailing list