[haiku-gsoc] Re: [HCD]: Bfs bug #1

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Thu, 19 Jun 2008 00:57:42 +0200

Stephan Assmus wrote:
> 
> Salvatore Benedetto wrote:
> > The patch attached should prevents the kernel from crashing in this 
> > occasion making
> > it more error prone. I called the boolean variable fOk. I really didn't 
> > know how else to call
> > it. Can somebody review it and give me his bless so that I can commit 
> > it please?
> 
> How about "fIsValid", "fGetSucceeded" or "fInitialized"? And shouldn't it 
> default to "false" (in the constructor)? What happens if someone calls 
> Put() without having called Get() before?

Sorry for replying to myself... I just wondered what happens if Get() is 
called multiple times. Either the caller needs to check the Get() return 
value and then not call Put() or there needs to be some kind of reference 
counting. (fOk -> fGetSuccessCount)

All that said without being familiar with the code at all...

Best regards,
-Stephan

Other related posts: