aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-07-06 22:29:32 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-07-06 22:29:32 +0200
commit8e0ab5d255876e48282d62443976d3d611089b15 (patch)
treea687121a53d62042169480d640dea70b6b6a8ada
parentfd95d284c0393c5eb6674ed4b4813fda342912c0 (diff)
downloadbuild-8e0ab5d255876e48282d62443976d3d611089b15.tar.gz
Fix typo
I wrote tgt instead t.
-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 "