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/ln.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ln.c') diff --git a/src/ln.c b/src/ln.c index 4f75c1919..197a8faec 100644 --- a/src/ln.c +++ b/src/ln.c @@ -138,7 +138,7 @@ do_link (const char *source, const char *dest) { /* Which stat to use depends on whether linkat will follow the symlink. We can't use the shorter - (logical ? stat : lstat) (source, &source_stats) + (logical?stat:lstat) (source, &source_stats) since stat might be a function-like macro. */ if ((logical ? stat (source, &source_stats) : lstat (source, &source_stats)) -- cgit v1.2.3-54-g00ecf