[prev in list] [next in list] [prev in thread] [next in thread]
List: haiku-commits
Subject: [haiku-commits] Re: r42499 - =?UTF-8?Q?haiku/trunk/src/add-on?= =?UTF-8?Q?s/kernel/drivers/network/
From: Alexander von Gluck <kallisti5 () unixzen ! com>
Date: 2011-07-27 1:52:30
Message-ID: 1cd095170aff098b7697c8ee3e16b0e0 () ssl ! unixzen ! com
[Download RAW message or body]
On Tue, 26 Jul 2011 20:52:47 +0200, Axel Dörfler wrote:
> On 26.07.2011 20:27, kallisti5@unixzen.com wrote:
>> - 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.
Yup. sorry for missing that.
Fixed in 42504
> I haven't seen the rest of this, so this might be wrong, but -EINVAL
> is
> Linux (where error codes are positive), not Haiku -- so you'll likely
> return something wrong there. Also, prefer to use >Haiku native
> errors
> like B_BAD_VALUE in this case.
Fixed in 42504
the usb_beceemwmx driver was my first shot at driver development and my
C/C++ was *a lot* weaker when I wrote it. (as evident by the extremely
poor choice to use inheritance *everywhere* in it... I just played with
that toy until it broke)
Anyway, cleaning it up more, removing the inheritance, finishing the
networking bits are all on my todo list after finishing the radeon_hd
driver.
Thanks!
-- Alex
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic