[haiku-commits] Re: haiku: hrev48513 - src/add-ons/kernel/file_systems/cdda

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 24 Dec 2014 13:54:51 +0100

Am 17/12/2014 um 17:34 schrieb pulkomandy@xxxxxxxxxxxxx:
  void
  Inode::RemoveAttrCookie(attr_cookie* cookie)
  {
-       fAttrCookies.Remove(cookie);
+       if (!fAttrCookies.Remove(cookie))
+               panic("Tried to remove %p which is not in cookie list.", 
cookie);

This is now O(n) instead of O(1); I don't really remember what the attr_cookie is used for, so that might not really be an issue.

Bye,
   Axel.


Other related posts: