]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix file_in_path
authorRoy Marples <roy@marples.name>
Fri, 16 Nov 2007 13:08:00 +0000 (13:08 +0000)
committerRoy Marples <roy@marples.name>
Fri, 16 Nov 2007 13:08:00 +0000 (13:08 +0000)
configure.c

index 57c5d01ee2db05fab85e9d93efb03fba5f879f95..121e2dff0a3b108f0337f4311062bb1007a553f6 100644 (file)
@@ -78,7 +78,7 @@ static int file_in_path (const char *file)
        p = path;
        while ((token = strsep (&p, ":"))) {
                snprintf (mypath, PATH_MAX, "%s/%s", token, file);
-               if (stat (mypath, &s)) {
+               if (stat (mypath, &s) == 0) {
                        retval = 0;
                        break;
                }