/* If the original path from above doesn't exist, try to create new
* path as if the "include" was relative to the current man page.
*/
- if (access (ret, F_OK) == 0)
+ if (CAN_ACCESS (ret, F_OK))
return ret;
dirname = dir_name (name);
temp_file = xasprintf ("%s/%s", dirname, include);
free (dirname);
- if (access (temp_file, F_OK) == 0) {
+ if (CAN_ACCESS (temp_file, F_OK)) {
/* Just plain include. */
free (ret);
ret = canonicalize_file_name (temp_file);
int i;
free (temp_file_asterisk);
- if (access (candidate_files[0], F_OK) == 0) {
+ if (CAN_ACCESS (candidate_files[0], F_OK)) {
free (ret);
ret = canonicalize_file_name (candidate_files[0]);
}
if (recurse == 0) {
struct stat new_buf;
- if (base)
- free (base);
+ free (base);
base = xstrdup (name);
debug ("\nult_src: File %s in mantree %s\n", name, path);