[haiku-commits] Re: r42499 - haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 26 Jul 2011 20:52:47 +0200

On 26.07.2011 20:27, kallisti5@xxxxxxxxxxx wrote:
Log:

Great, that gives me the opportunity to point out a few more coding style violations :-)

-       if (fNotifyBuffer)
+       if (fNotifyBuffer != NULL)
                free(fNotifyBuffer);
                        // Free notification buffer

Two things are wrong here: the comment makes this a multiline statement, so {} are needed. However, the coding style also asks you not to check for NULL before free() and delete, as that's just useless clutter.
There are more occurrences of this in this patch alone.

Bye,
   Axel.


Other related posts: