q may be used uninitialised

This commit is contained in:
Richard Levitte 2002-08-15 22:06:14 +00:00
parent e73308638a
commit bde63f803a

View file

@ -8,7 +8,7 @@
int main(int argc, char *argv[])
{
char *p, *q, *program;
char *p, *q = 0, *program;
p = strrchr(argv[0], '/');
if (!p) p = strrchr(argv[0], '\\');
@ -34,7 +34,8 @@ int main(int argc, char *argv[])
}
for(p = program; *p; p++)
if (islower(*p)) *p = toupper(*p);
if (islower((unsigned char)(*p)))
*p = toupper((unsigned char)(*p));
q = strstr(program, "TEST");
if (q > p && q[-1] == '_') q--;