On Thu, Aug 01, 2024 at 11:13:59PM +0800, shejialuo wrote: > @@ -254,9 +251,9 @@ static int report(struct fsck_options *options, > prepare_msg_ids(); > strbuf_addf(&sb, "%s: ", msg_id_info[msg_id].camelcased); > > - va_start(ap, fmt); > - strbuf_vaddf(&sb, fmt, ap); > - result = options->error_func(options, &report, > + va_copy(ap_copy, ap); Can't we use `ap` directly instead of copying it? We'd have to get rid of the call to `va_end` as our caller already does that, but other than that I don't see any reason to copy the argument list here. > + strbuf_vaddf(&sb, fmt, ap_copy); > + result = options->error_func(options, fsck_report, > msg_type, msg_id, sb.buf); > strbuf_release(&sb); > va_end(ap); Patrick
Attachment:
signature.asc
Description: PGP signature