Fix various minor issues discovered with static analysis using Visual Studio 2005 Team System.

Removed obsolete comment, since .dll modules are no longer supported on windows, only .pyd.
This commit is contained in:
Kristján Valur Jónsson 2007-04-21 12:46:49 +00:00
parent 8ff1f6a69e
commit 5e4e31f76a
8 changed files with 39 additions and 30 deletions

View file

@ -4788,18 +4788,19 @@ _PyPopenCreateProcess(char *cmdstring,
(sizeof(modulepath)/sizeof(modulepath[0]))
-strlen(modulepath));
if (stat(modulepath, &statinfo) != 0) {
size_t mplen = sizeof(modulepath)/sizeof(modulepath[0]);
/* Eeek - file-not-found - possibly an embedding
situation - see if we can locate it in sys.prefix
*/
strncpy(modulepath,
Py_GetExecPrefix(),
sizeof(modulepath)/sizeof(modulepath[0]));
mplen);
modulepath[mplen-1] = '\0';
if (modulepath[strlen(modulepath)-1] != '\\')
strcat(modulepath, "\\");
strncat(modulepath,
szConsoleSpawn,
(sizeof(modulepath)/sizeof(modulepath[0]))
-strlen(modulepath));
mplen-strlen(modulepath));
/* No where else to look - raise an easily identifiable
error, rather than leaving Windows to report
"file not found" - as the user is probably blissfully