Mercurial > cpython-lru_cache-weakref
diff Python/getcwd.c @ 61270:6fb6fa802221 legacy-trunk
Remove an unneeded variable and fix a little whitespace.
Found using Clang's static analyzer.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Wed, 05 May 2010 20:26:58 +0000 |
| parents | 2d8fa74f9263 |
| children | fd25030223b0 |
line wrap: on
line diff
--- a/Python/getcwd.c Wed May 05 20:25:47 2010 +0000 +++ b/Python/getcwd.c Wed May 05 20:26:58 2010 +0000 @@ -28,7 +28,7 @@ { char localbuf[MAXPATHLEN+1]; char *ret; - + if (size <= 0) { errno = EINVAL; return NULL; @@ -59,14 +59,13 @@ { FILE *fp; char *p; - int sts; if (size <= 0) { errno = EINVAL; return NULL; } if ((fp = popen(PWD_CMD, "r")) == NULL) return NULL; - if (fgets(buf, size, fp) == NULL || (sts = pclose(fp)) != 0) { + if (fgets(buf, size, fp) == NULL || pclose(fp) != 0) { errno = EACCES; /* Most likely error */ return NULL; }
