[dpkg] 119/187: libdpkg: Improve comment in error_context_errmsg_format()
Reiner Herrmann
reiner at reiner-h.de
Sun Nov 6 12:46:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository dpkg.
commit 1dff5fd4920f3d457a1b0b7d43d9ed9a3fb73f35
Author: Guillem Jover <guillem at debian.org>
Date: Wed Aug 10 20:39:39 2016 +0200
libdpkg: Improve comment in error_context_errmsg_format()
The wording was quite confusing on the code flow.
---
lib/dpkg/ehandle.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 53deb36..e59b7b3 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -443,13 +443,14 @@ void ohshite(const char *fmt, ...) {
e=errno;
+ /* First we construct the formatted message. */
va_start(args, fmt);
rc = error_context_errmsg_format(fmt, args);
va_end(args);
- /* If there was an error, just use the emergency error message buffer,
- * and ignore the errno value, as we will probably have no space left
- * anyway. Otherwise append the string for errno. */
+ /* Then if there was no error we append the string for errno. Otherwise
+ * we just use the emergency error message buffer, and ignore the errno
+ * value, as we will probably have no space left anyway. */
if (rc > 0) {
char *errmsg = NULL;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list