scc

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

commit 0223a5c571adfc86ca419b5e40e22248842240cf
parent 5f23619bd095d0a7069356eff28bb6623be0dded
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 10 Jan 2025 21:44:48 +0100

make/posix: Ignore error from stat()

If we cannot determine that fname is a directory then it is
better to just shutup and say that it is not a directory.

Diffstat:
Msrc/cmd/scc-make/posix.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/cmd/scc-make/posix.c b/src/cmd/scc-make/posix.c @@ -16,10 +16,8 @@ is_dir(char *fname) { struct stat st; - if (stat(fname, &st) < 0) { - perror("make: cheking if target is a dir"); + if (stat(fname, &st) < 0) return 0; - } return (st.st_mode & S_IFMT) == S_IFDIR; }