diff options
author | Brett Cannon <bcannon@gmail.com> | 2010-05-05 20:20:19 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2010-05-05 20:20:19 +0000 |
commit | 0b03f10afb301560c711b953b6ca2ecef3181eed (patch) | |
tree | d932a40f49fcfde3a3685d4e60b759fb0cdfe03f /Python/getcwd.c | |
parent | 8a478ced5585c7819668d028f6969b043a86fc58 (diff) | |
download | cpython-git-0b03f10afb301560c711b953b6ca2ecef3181eed.tar.gz |
Remove three unneeded variable assignments.
Found using Clang's static analyzer.
Diffstat (limited to 'Python/getcwd.c')
-rw-r--r-- | Python/getcwd.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } |