verbose: Fix wrong error report
[src/app-framework-binder.git] / src / verbose.c
index b875106..f330c6f 100644 (file)
@@ -126,6 +126,7 @@ static void _vverbose_(int loglevel, const char *file, int line, const char *fun
        n = 2;
        if (fmt) {
                iov[n].iov_base = buffer;
+               errno = saverr;
                rc = vsnprintf(buffer, sizeof buffer, fmt, args);
                if (rc < 0)
                        rc = 0;