can function sftp_upload return OK even if an error message is received?
Colin Watson
cjwatson at debian.org
Tue May 20 20:16:45 AEST 2025
On Tue, May 20, 2025 at 06:09:25PM +1000, Damien Miller wrote:
>Thanks, I'm not 100% sure it can happen but that's alone enough reason
>to make it perfectly obvious that it can't.
Speaking of making things perfectly obvious, is it just me who always
has to look up the order of precedence of logical operators vs. ternary
operators?
>- return status == SSH2_FX_OK ? 0 : -1;
>+ return status != SSH2_FX_OK || failed ? -1 : 0;
"||" binds more tightly than "?:", so this should be OK - but I did have
to check, so I think some parentheses for clarity might not go amiss
here.
Thanks,
--
Colin Watson (he/him) [cjwatson at debian.org]
More information about the openssh-unix-dev
mailing list