From 6e73660bddbc258ebc013dbb8a276fce3fe48aa8 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 23 Apr 2024 08:49:59 +0100 Subject: make: code shrink The 'quick fix' in the previous commit unnecessarily checks the fractional timestamp value to determine if a target exists. This isn't how it's done elsewhere in the code. --- miscutils/make.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miscutils/make.c b/miscutils/make.c index c2e12f2ed..fca00d8e3 100644 --- a/miscutils/make.c +++ b/miscutils/make.c @@ -2511,7 +2511,7 @@ make(struct name *np, int level) if (estat & MAKE_DIDSOMETHING) { modtime(np); - if (np->n_tim.tv_sec == 0 && np->n_tim.tv_nsec == 0) + if (!np->n_tim.tv_sec) clock_gettime(CLOCK_REALTIME, &np->n_tim); } else if (!quest && level == 0 && !timespec_le(&np->n_tim, &dtim)) printf("%s: '%s' is up to date\n", applet_name, np->n_name); -- cgit v1.2.3-55-g6feb