gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] op_ret checking in pl_open_cbk


From: Vikas Gorur
Subject: Re: [Gluster-devel] op_ret checking in pl_open_cbk
Date: Tue, 04 Mar 2008 19:21:53 +0530
User-agent: Sup/0.4

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]