You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch

21 lines
706 B

fix writing of the error message to stderr by processing the varargs
--- a/src/error.c
+++ b/src/error.c
@@ -23,7 +23,6 @@ void error_init(error_t *err, int error_code, const char *desc_fmt, ...)
{
va_list args;
- fprintf(stderr, "error_init: %d %s", error_code, desc_fmt);
daemon_assert(err != NULL);
daemon_assert(error_code >= 0);
daemon_assert(desc_fmt != NULL);
@@ -32,6 +31,7 @@ void error_init(error_t *err, int error_code, const char *desc_fmt, ...)
va_start(args, desc_fmt);
vsnprintf(err->desc, sizeof(err->desc), desc_fmt, args);
va_end(args);
+ fprintf(stderr, "error_init: %d %s\n", error_code, err->desc);
daemon_assert(invariant(err));
}