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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux