Declare loop-updated variable outside the loop.

Found by scan-build.
This commit is contained in:
Sam Tobin-Hochstadt 2020-04-03 14:45:45 -04:00 committed by Sam Tobin-Hochstadt
parent 92c1ba9a62
commit c81689bf9f

View File

@ -357,6 +357,7 @@ int main(int argc, char **argv)
char *exe_path, *lib_path, *dll_path;
int start, decl_end, prog_end, end, count, fd, v, en, x11;
int argpos, inpos, collcount = 1, fix_argv;
int bufsize = 127;
if (config[7] == '[') {
write_str(2, argv[0]);
@ -415,7 +416,7 @@ int main(int argc, char **argv)
/* resolve soft links */
while (1) {
int len, bufsize = 127;
int len;
char *buf;
buf = (char *)malloc(bufsize + 1);
len = readlink(me, buf, bufsize);