On Tue, 26 Jul 2011 20:52:47 +0200, Axel Dörfler wrote:
On 26.07.2011 20:27, kallisti5@xxxxxxxxxxx wrote:- if (fNotifyBuffer) + if (fNotifyBuffer != NULL) free(fNotifyBuffer); // Free notification bufferTwo things are wrong here: the comment makes this a multiline statement, so {} are needed. However, the coding style also asks younot to check for NULL before free() and delete, as that's just uselessclutter. 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 isLinux (where error codes are positive), not Haiku -- so you'll likelyreturn something wrong there. Also, prefer to use >Haiku native errorslike 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