]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix SMALL build
authorRoy Marples <roy@marples.name>
Thu, 2 Jul 2020 17:14:01 +0000 (18:14 +0100)
committerRoy Marples <roy@marples.name>
Thu, 2 Jul 2020 17:14:01 +0000 (18:14 +0100)
src/logerr.c

index 8a219b02147681b208b836177ba1371e78486d6d..a2d46017ee80d30c729e1710b90b1e1b1ec5c7e9 100644 (file)
@@ -117,16 +117,15 @@ logprintdate(FILE *stream)
 __printflike(3, 0) static int
 vlogprintf_r(struct logctx *ctx, FILE *stream, const char *fmt, va_list args)
 {
-       FILE *err;
        int len = 0, e;
        va_list a;
 #ifndef SMALL
+       FILE *err = ctx->log_err == NULL ? stderr : ctx->log_err;
        bool log_pid;
 #ifdef LOGERR_TAG
        bool log_tag;
 #endif
 
-       err = ctx->log_err == NULL ? stderr : ctx->log_err;
        if ((stream == err && ctx->log_opts & LOGERR_ERR_DATE) ||
            (stream != err && ctx->log_opts & LOGERR_LOG_DATE))
        {