Re: op_ret checking in pl_open_cbk

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

 



Excerpts from LI Daobing's message of Tue Mar 04 15:19:29 +0530 2008:
> Hello,
> 
> there is a checking in pl_open_cbk, it's "if (op_ret == 0)", i think
> it should be "if (op_ret >= 0)", what do you think:

We don't pass the fd as the return value in open_cbk, that goes in the
fd_t. storage/posix returns 0 if an fd was successfully opened. 

So the current code is not incorrect. However, changing it to >= is a good idea,
making the code more defensive. 

Thanks for finding this!
Vikas

-- 
http://vikas.80x25.org/




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux