From: Brett Cannon Date: Wed, 5 May 2010 20:26:58 +0000 (+0000) Subject: Remove an unneeded variable and fix a little whitespace. X-Git-Tag: v2.7b2~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b9c04941beb84fba0f52aec36e480339d826fbe;p=python Remove an unneeded variable and fix a little whitespace. Found using Clang's static analyzer. --- diff --git a/Python/getcwd.c b/Python/getcwd.c index 967d484b35..36fcd5ceff 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; }