Re: Handle bad file descriptors with EBADF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 4, 2012 at 4:17 AM, Sage Weil <sage@xxxxxxxxxxx> wrote:
>
> but this is actually doing the lookup twice.  A better pattern:
>
>         map<foo, bar>::iterator p = container.find(key);
>         if (p == container.end())
>                 return NULL;
>         return p->second;

Cool, thanks for tip!
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux