diff options
author | Ron Yorston <rmy@pobox.com> | 2024-04-23 08:49:59 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-04-23 08:49:59 +0100 |
commit | 6e73660bddbc258ebc013dbb8a276fce3fe48aa8 (patch) | |
tree | 7c9dd41c770c74a639935b1ee33e5b40ca20e442 | |
parent | 79226860ee5627ffee9b3d4722f6bc91b64ce91c (diff) | |
download | busybox-w32-6e73660bddbc258ebc013dbb8a276fce3fe48aa8.tar.gz busybox-w32-6e73660bddbc258ebc013dbb8a276fce3fe48aa8.tar.bz2 busybox-w32-6e73660bddbc258ebc013dbb8a276fce3fe48aa8.zip |
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.
-rw-r--r-- | miscutils/make.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
2511 | 2511 | ||
2512 | if (estat & MAKE_DIDSOMETHING) { | 2512 | if (estat & MAKE_DIDSOMETHING) { |
2513 | modtime(np); | 2513 | modtime(np); |
2514 | if (np->n_tim.tv_sec == 0 && np->n_tim.tv_nsec == 0) | 2514 | if (!np->n_tim.tv_sec) |
2515 | clock_gettime(CLOCK_REALTIME, &np->n_tim); | 2515 | clock_gettime(CLOCK_REALTIME, &np->n_tim); |
2516 | } else if (!quest && level == 0 && !timespec_le(&np->n_tim, &dtim)) | 2516 | } else if (!quest && level == 0 && !timespec_le(&np->n_tim, &dtim)) |
2517 | printf("%s: '%s' is up to date\n", applet_name, np->n_name); | 2517 | printf("%s: '%s' is up to date\n", applet_name, np->n_name); |