]> git.proxmox.com Git - mirror_qemu.git/commitdiff
util/log: Drop return value from qemu_log
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 17 Apr 2022 18:29:57 +0000 (11:29 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 20 Apr 2022 17:51:11 +0000 (10:51 -0700)
The only user of this feature, tcg_dump_ops, has been
converted to use fprintf directly.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-18-richard.henderson@linaro.org>

include/qemu/log-for-trace.h
util/log.c

index 5e415172278a2acd4528cff167814d9231a046de..d47c9cd4462b7e9ec9bf4e5bebe4a91e30107624 100644 (file)
@@ -30,6 +30,6 @@ static inline bool qemu_loglevel_mask(int mask)
 }
 
 /* main logging function */
-int G_GNUC_PRINTF(1, 2) qemu_log(const char *fmt, ...);
+void G_GNUC_PRINTF(1, 2) qemu_log(const char *fmt, ...);
 
 #endif
index 090bc3bc396e867a63872f0bdc44516a3f5c5409..2bd4dfba1bcd244c616f45b98319e220edd887a6 100644 (file)
@@ -59,26 +59,17 @@ void qemu_log_unlock(FILE *fd)
     }
 }
 
-/* Return the number of characters emitted.  */
-int qemu_log(const char *fmt, ...)
+void qemu_log(const char *fmt, ...)
 {
     FILE *f = qemu_log_trylock();
-    int ret = 0;
-
     if (f) {
         va_list ap;
 
         va_start(ap, fmt);
-        ret = vfprintf(f, fmt, ap);
+        vfprintf(f, fmt, ap);
         va_end(ap);
         qemu_log_unlock(f);
-
-        /* Don't pass back error results.  */
-        if (ret < 0) {
-            ret = 0;
-        }
     }
-    return ret;
 }
 
 static void __attribute__((__constructor__)) qemu_logfile_init(void)