diff --git a/tools/regression/fsx/fsx.c b/tools/regression/fsx/fsx.c index 316185d48116..7da745bfe3d1 100644 --- a/tools/regression/fsx/fsx.c +++ b/tools/regression/fsx/fsx.c @@ -164,9 +164,13 @@ prt(char *fmt, ...) va_start(args, fmt); vfprintf(stdout, fmt, args); - if (fsxlogf) - vfprintf(fsxlogf, fmt, args); va_end(args); + + if (fsxlogf) { + va_start(args, fmt); + vfprintf(fsxlogf, fmt, args); + va_end(args); + } } void