]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Avoid vsnprintf for error reporting.
authorNick Bowler <nbowler@draconx.ca>
Fri, 23 Jun 2023 05:11:15 +0000 (01:11 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 23 Jun 2023 05:17:49 +0000 (01:17 -0400)
commit655528745c72b4a7d50aee1688c359dc069ee546
tree21b745c2535defa9820206a184fdec27913b8760
parentb9d67c6ec4c59b204883dfbf346e3b7fca54a84b
libcdecl: Avoid vsnprintf for error reporting.

Using vsnprintf is overkill here.  We only need to handle a single %s
conversion, which can be done by direct call to snprintf.

As this is the only caller of vsnprintf, dropping it means we can drop
the vsnprintf gnulib module.  Also, at least with gcc, using va_start
and such is fairly expensive.  The direct-snprintf version is quite
a bit more compact.
bootstrap
m4/gnulib-cache.m4
src/cdecl-internal.h
src/error.c
t/cdeclerr.c