commit e41aba7c606ab17d01bbf206426f779a1ce0fe1a
parent 5eb60cb925e4b3c477efd07016acb43510e7d6e9
Author: Louis Burda <quent.burda@gmail.com>
Date: Sat, 9 Mar 2024 22:15:07 +0100
Update status message format
Diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/mplay.h b/mplay.h
@@ -135,10 +135,12 @@ mplay_status(const char *cmd, const char *fmt, ...)
{
va_list ap;
- if (!fmt) fmt = "ok";
- printf("mplay!:%s:", cmd);
- va_start(ap, fmt);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
+ printf("mplay!%s", cmd);
+ if (fmt) {
+ fputc(':', stdout);
+ va_start(ap, fmt);
+ vfprintf(stdout, fmt, ap);
+ va_end(ap);
+ }
fputc('\n', stdout);
}