[haiku-commits] Re: haiku: hrev48664 - in src/add-ons/kernel: file_cache network/stack src

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 12 Jan 2015 16:53:04 +0100

On Mon, Jan 12, 2015 at 10:25:56AM -0500, Augustin Cavalier wrote:
> On Mon, Jan 12, 2015 at 4:14 AM, <pulkomandy@xxxxxxxxxxxxx> wrote:
> 
> > c4718ea: Missing std::nothrow on new
> >
> >   Forgot to add this when migrating to BOpenHashTable.
> >
> 
> I thought the kernel doesn't have exceptions, so this isn't needed?
> 
> Or is this for the future when we (might) have exceptions?

I prefer to be safe. Some files may be used from userland (for example
by userlandfs), and even if exceptions are disabled, it is better to
inform the compiler and people reading the code that the new call can
return NULL here.

-- 
Adrien.

Other related posts: