Re: [PATCH 12/16] nfs-utils: make makesock() static

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

 



On Thursday September 4, chuck.lever@xxxxxxxxxx wrote:
> 
>  o  Return RPC_ANYSOCK on error (this is -1) instead of open-coding -1.

I don't agree with this change.
Everything else (including the last) looks fine, though I personally
wouldn't bother closing file descriptors and freeing memory just
before exit.

RPC_ANYSOCK is an input value to various rpc library functions which
means "I haven't opened a socket, you do it for me".  It is not really
a valid return value.

Every time makesock is called, the return status is tested with 
     if (makesock(...) < 0)

To me, that says that the returned value should be e.g. -1, not
RPC_ANYSOCK.

Thanks,
NeilBrown

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux