summaryrefslogtreecommitdiff
path: root/usr.bin/awk/run.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2023-09-18 15:16:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2023-09-18 15:16:23 +0000
commit9b6a8a6c87eaaf75056cde0c4cc0c75e03e6ce39 (patch)
tree0496d13d19702e8d5703c56c290cf62110f511a9 /usr.bin/awk/run.c
parentf726bae183365b7cad1675655e2b1d7cec1fa2b1 (diff)
2 cases of c99 for-scope variable decl, when a variable already exists
in scope. but a 3rd similar situation in the same scope exists also, which does not create a new variable, and uses the upper scope variable. Pretty sloppy stuff. ok millert
Diffstat (limited to 'usr.bin/awk/run.c')
-rw-r--r--usr.bin/awk/run.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/awk/run.c b/usr.bin/awk/run.c
index 6d2658fcb75..c4719bbd516 100644
--- a/usr.bin/awk/run.c
+++ b/usr.bin/awk/run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: run.c,v 1.75 2023/09/17 14:49:44 millert Exp $ */
+/* $OpenBSD: run.c,v 1.76 2023/09/18 15:16:22 deraadt Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
@@ -1350,7 +1350,7 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co
int i;
if (ljust) { // print one char from t, then pad blanks
- for (int i = 0; i < n; i++)
+ for (i = 0; i < n; i++)
*p++ = t[i];
for (i = 0; i < pad; i++) {
//printf(" ");
@@ -1361,7 +1361,7 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co
//printf(" ");
*p++ = ' ';
}
- for (int i = 0; i < n; i++)
+ for (i = 0; i < n; i++)
*p++ = t[i];
}
*p = 0;