amatrix

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
git clone git://git.kocotian.pl/amatrix.git
Log | Files | Refs | README | LICENSE

commit 66a0be34e058eb5325fa1d4f97fca9bd66f7372e
parent b5c25435494093eb8c80bc581eb4e52d9dc33a03
Author: hoijui <hoijui.quaero@gmail.com>
Date:   Mon,  4 Dec 2017 15:04:15 +0100

`va_system()`: rename buffer variable and make buffer size a variable

Diffstat:
Mcmatrix.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/cmatrix.c b/cmatrix.c @@ -76,12 +76,13 @@ volatile sig_atomic_t signal_status = 0; /* Indicates a caught signal */ int va_system(char *str, ...) { va_list ap; - char foo[133]; + static const unsigned int buf_size = 133; + char buf[buf_size]; va_start(ap, str); - vsnprintf(foo, 132, str, ap); + vsnprintf(buf, buf_size - 1, str, ap); va_end(ap); - return system(foo); + return system(buf); } /* What we do when we're all set to exit */