char *cmnd, *path;
{
int plen;
- static struct stat cst;
struct stat pst;
DIR *dirp;
struct dirent *dent;
static char *c;
/* only need to stat cmnd once since it never changes */
- if (cst.st_dev == 0) {
- if (stat(cmnd, &cst) < 0)
+ if (cmnd_st.st_dev == 0) {
+ if (stat(cmnd, &cmnd_st) < 0)
return(FALSE);
if ((c = strrchr(cmnd, '/')) == NULL)
c = cmnd;
if (stat(path, &pst) < 0)
return(FALSE);
- return(cst.st_dev == pst.st_dev && cst.st_ino == pst.st_ino);
+ return(cmnd_st.st_dev == pst.st_dev && cmnd_st.st_ino == pst.st_ino);
}
/* grot through path's directory entries, looking for cmnd */
#endif /* FAST_MATCH */
if (stat(buf, &pst) < 0)
continue;
- if (cst.st_dev == pst.st_dev && cst.st_ino == pst.st_ino)
+ if (cmnd_st.st_dev == pst.st_dev && cmnd_st.st_ino == pst.st_ino)
break;
}