Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fvbe.git;a=commitdiff;h=f99fbd90acf6d9e3012efbd282ea2225e77c3ea7
commit f99fbd90acf6d9e3012efbd282ea2225e77c3ea7 Author: James Buren <[email protected]> Date: Sat Oct 19 12:34:59 2013 -0500 viconfig: stat -> ispathpresent diff --git a/src/viconfig.c b/src/viconfig.c index 284cc1d..4ac312e 100644 --- a/src/viconfig.c +++ b/src/viconfig.c @@ -41,7 +41,6 @@ static bool viconfig_setup_editors(void) size_t i = 0; const char *s = 0; char path[PATH_MAX] = {0}; - struct stat st = {0}; size_t j = 0; editors = alloc(char *,list_count + 1); @@ -50,7 +49,7 @@ static bool viconfig_setup_editors(void) { strfcpy(path,sizeof(path),"usr/bin/%s",s); - if(stat(path,&st) == 0 && S_ISREG(st.st_mode) && (st.st_mode & 0755) == 0755) + if(ispathpresent(path,S_IFREG,0755)) editors[j++] = strdup(s); } _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
