aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/build.c b/build.c
index bd17187..ea17de3 100644
--- a/build.c
+++ b/build.c
@@ -102,12 +102,12 @@ main(int argc, char *argv[])
/* compare source > target */
for (t = tgt; *t; t++)
if (!isspace(*t)) break;
- for (tt = tgt; *tt; tt++)
+ for (tt = t; *tt; tt++)
if (isspace(*tt)) { *tt = 0; break; }
- if (stat(t, &ssb))
- err(1, t);
if (stat(argv[i], &sb))
err(1, argv[i]);
+ if (stat(t, &ssb))
+ err(1, t);
if (sb.st_mtime > ssb.st_mtime) {
if (dflag)
fprintf(stderr, "%s: building because "