scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 3f017b5cfe79b8ff60e1b9edfdce87231d4a8151
parent ec053d449b88db890e757b81d839a3fb9c0eea36
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 29 Oct 2024 21:41:48 +0100

make: Use FILENAME_MAX for temporary in inference()

The temporary is used to hold a tentative file name that is checked
to see if the inference rule can be applied and it had an arbitrary
too small value of 20. As it is a file, FILENAME_MAX is a much better
value.

Diffstat:
Msrc/cmd/scc-make/rules.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmd/scc-make/rules.c b/src/cmd/scc-make/rules.c @@ -329,7 +329,7 @@ inference(Target *tp) int tolen, r; char *to, *from; Target *q, **p, *suffixes; - char buf[20], fname[FILENAME_MAX]; + char buf[FILENAME_MAX], fname[FILENAME_MAX]; debug("searching an inference rule for %s", tp->name);