]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Remove/rescope variable 'ret' in sftp_put_file.
authorSimon Tatham <anakin@pobox.com>
Thu, 29 Dec 2016 11:25:34 +0000 (11:25 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 29 Dec 2016 11:29:14 +0000 (11:29 +0000)
commit86ba2e63392de207eb02916ba83af17af755c840
treec658a900bb0c0fef98d8a4362539bed47f6683cc
parentfa383072440a3ae6f6cf3ad5e024750d973ccb07
Remove/rescope variable 'ret' in sftp_put_file.

This is a purely stylistic cleanup - no functional change intended -
after Tim Kosse's changes in commits e9a76883a and 6f871e3d2.

I think the underlying cause of the confusion whose functional effects
he was fixing there is that I have the bad habit of tending to call
variables 'ret' for two different reasons: one is because it's holding
the value returned from some subroutine I've just called, and the
other is because it's holding the value I'm preparing to return from
the routine _containing_ the variable.

The reason it's a bad habit is that I confuse the two purposes, and a
variable of one type ends up accidentally being treated as the other.
So while Tim's commits have already fixed the functional effects of
the error in this case, this change should help prevent a recurrence
because now there's no variable called 'ret' at all that's in scope
for the whole function.
psftp.c