Commit 8b9c0494 authored by Brett Cannon's avatar Brett Cannon

Remove an unneeded variable and fix a little whitespace.

Found using Clang's static analyzer.
parent b166afc1
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment