From c0dcf3238bb9341c03bdb7f73c1af1b3898de557 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 23 Oct 2009 06:06:46 -0600 Subject: build: prohibit improper use of stat and lstat * cfg.mk (sc_prohibit_stat_macro_address): New rule. * src/ln.c (do_link): Adjust comment to avoid false positive. * src/stat.c (do_stat): Likewise. * src/touch.c (main): Likewise. --- src/stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stat.c') diff --git a/src/stat.c b/src/stat.c index d3e16d705..ae5491154 100644 --- a/src/stat.c +++ b/src/stat.c @@ -903,7 +903,7 @@ do_stat (char const *filename, bool terse, char const *format) } } /* We can't use the shorter - (follow_links ? stat : lstat) (filename, &statbug) + (follow_links?stat:lstat) (filename, &statbug) since stat might be a function-like macro. */ else if ((follow_links ? stat (filename, &statbuf) -- cgit v1.2.3-54-g00ecf