Return to mansearch.c CVS log | Up to [local] / src / usr.bin / mandoc |
version 1.19, 2014/04/11 15:45:39 | version 1.20, 2014/04/15 23:47:57 | ||
---|---|---|---|
|
|
||
*/ | */ | ||
if (NULL == getcwd(buf, PATH_MAX)) { | if (NULL == getcwd(buf, PATH_MAX)) { | ||
perror(NULL); | perror("getcwd"); | ||
goto out; | goto out; | ||
} else if (-1 == (fd = open(buf, O_RDONLY, 0))) { | } else if (-1 == (fd = open(buf, O_RDONLY, 0))) { | ||
perror(buf); | perror(buf); | ||
|
|
||
} | } | ||
rc = 1; | rc = 1; | ||
out: | out: | ||
exprfree(e); | if (-1 != fd) { | ||
if (-1 != fd) | if (-1 == fchdir(fd)) | ||
perror(buf); | |||
close(fd); | close(fd); | ||
} | |||
exprfree(e); | |||
free(sql); | free(sql); | ||
*sz = cur; | *sz = cur; | ||
return(rc); | return(rc); |