Go to the FreeLists Home Page Home Signup Help Login
 



[openbeos] || [Date Prev] [08-2004 Date Index] [Date Next] || [Thread Prev] [08-2004 Thread Index] [Thread Next]

[openbeos] Re: openbeos Digest V4 #163

  • From: Philippe Houdoin <philippe.houdoin@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Thu, 5 Aug 2004 17:04:02 +0200
> I saw this checkin, and am concenred about the symantics of InitCheck() here.
>
> I believe that InitCheck() everywhere else should be returning a status_t.
>
> It returns a bool here. This could be the cause of major future bugs, as
> people will likely be
> checking against B_OK (which is equivalent to false, or 0), and not know why
> InitCheck() is failing.

You're right, I agreed 100%.
My mistake.

> Might I suggest
>
>       return fFile > -1 ? B_OK : B_ERROR;
>
> or ever caching the error value in fFile or another var and returning that.
> It seems a shame to
> throw away perfectly good error values as the code currently does.

Fix commited.
Thanks for noticing.

- Philippe





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.