Re: [PATCH 10/11] Staging: vt6656: Combined nested conditions

2014-01-02 Thread Dan Carpenter
On Thu, Dec 26, 2013 at 07:55:39PM +0100, Sebastian Rachuj wrote: > - if (pbyDesireSSID != NULL) { > - if (((PWLAN_IE_SSID) pbyDesireSSID)->len != 0) > - pSSID = (PWLAN_IE_SSID) pbyDesireSSID; > - } > + if ((pbyDesireSSID != NULL) && > + (((PWLAN_

[PATCH 10/11] Staging: vt6656: Combined nested conditions

2013-12-26 Thread Sebastian Rachuj
From: Simon Schuster This patch reduces the level of indentation in bssdb.c of the vt6656 driver by transforming nested conditions to a series of logical conjunctions. E.g. if (cond1) { if (cond2) { block(); } } is transformed to if (cond1 && cond2) { bl