summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2010-05-05 20:26:58 (GMT)
committerBrett Cannon <bcannon@gmail.com>2010-05-05 20:26:58 (GMT)
commit8b9c04941beb84fba0f52aec36e480339d826fbe (patch)
treef588cbedc8968dd39f66d33b98f8d78b01b0c8aa /Python
parentb166afc17cfc49fffbac6bbc6de67994fe037f72 (diff)
downloadcpython-8b9c04941beb84fba0f52aec36e480339d826fbe.zip
cpython-8b9c04941beb84fba0f52aec36e480339d826fbe.tar.gz
cpython-8b9c04941beb84fba0f52aec36e480339d826fbe.tar.bz2
Remove an unneeded variable and fix a little whitespace.
Found using Clang's static analyzer.
Diffstat (limited to 'Python')
-rw-r--r--Python/getcwd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/getcwd.c b/Python/getcwd.c
index 967d484..36fcd5c 100644
--- a/Python/getcwd.c
+++ b/Python/getcwd.c
@@ -28,7 +28,7 @@ getcwd(char *buf, int size)
{
char localbuf[MAXPATHLEN+1];
char *ret;
-
+
if (size <= 0) {
errno = EINVAL;
return NULL;
@@ -59,14 +59,13 @@ getcwd(char *buf, int size)
{
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;
}