rstudio/rstudio — comment on commit c94c6c8d0013cec7f1a121aa2ebe2a5ac59b57b1
File: src/cpp/core/system/Win32ChildProcess.cpp line 549
By jjallaire:

I've historically tried to scope error variables as tightly as possible so that there is no chance of criss-crossing error states (realize of course there is no chance of that here). When I do scope them more expansively it is usually because I am not going to check/act on them until later so the broader scope is necessary. When I saw that declaration at the top it was a therefore an implicit signal to me that some more fancy / nuanced error handling was happening (which it wasn't). Just for consistency sake let's make these declarations all local.