]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
authorjh <jh@FreeBSD.org>
Fri, 5 Mar 2010 15:23:01 +0000 (15:23 +0000)
committerjh <jh@FreeBSD.org>
Fri, 5 Mar 2010 15:23:01 +0000 (15:23 +0000)
commitba646ecd6fecd8f82a5df041fa3818b1f49cb375
tree411318be07df3cec7aa3f6855cc1e38c3aea5ee5
parent94e741a5e69d24673cb9820a57dd0397eb65f6ce
- Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
  snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
  once, the command didn't necessarily fit to the final command buffer. Fix
  this using a dynamic sbuf buffer. Add a few regression tests for the case.

PR: bin/95079
No objections: freebsd-hackers
tools/regression/usr.bin/Makefile
tools/regression/usr.bin/apply/Makefile [new file with mode: 0644]
tools/regression/usr.bin/apply/regress.00.in [new file with mode: 0644]
tools/regression/usr.bin/apply/regress.00.out [new file with mode: 0644]
tools/regression/usr.bin/apply/regress.01.out [new file with mode: 0644]
tools/regression/usr.bin/apply/regress.01.sh [new file with mode: 0644]
tools/regression/usr.bin/apply/regress.sh [new file with mode: 0644]
tools/regression/usr.bin/apply/regress.t [new file with mode: 0644]
usr.bin/apply/Makefile
usr.bin/apply/apply.c