common: Clarify use of vars in buffer copy code.
authorWerner Koch <wk@gnupg.org>
Thu, 19 Jan 2017 08:57:27 +0000 (09:57 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 19 Jan 2017 08:59:08 +0000 (09:59 +0100)
commit55c9212a2338bf0b07c8cf3a69bcedaa28d48d43
tree6f92bc1bd4ce9991193776833b861505d4fb321b
parent367349b4dcc97718f8ae1163d1389d2a46fc3453
common: Clarify use of vars in buffer copy code.

* common/exectool.c (my_error_from_errno): New.
(copy_buffer_do_copy): Use separate vars for errno values and
gpg-error values for clarity.  s/assert/log_assert/.
(copy_buffer_flush): Ditto.
(gnupg_exec_tool_stream): Use gpg_err_code when testing.
--

NB: It is surprising that es_write seems not to set ERRNO but only
returns the ERRNO value.  Need to check whether this is really the
case.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/exectool.c