]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(validate_path): Compare the result of the function --
authorJim Meyering <jim@meyering.net>
Fri, 24 May 2002 08:24:29 +0000 (08:24 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 24 May 2002 08:24:29 +0000 (08:24 +0000)
not its (constant) address -- against zero.

src/pathchk.c

index 39b939bdb4a77b8615a35e236beacb7238653ef1..3722b438c419d39f11420fba5bf0139b9c7c9f87 100644 (file)
@@ -1,5 +1,5 @@
 /* pathchk -- check whether pathnames are valid or portable
-   Copyright (C) 1991-2001 Free Software Foundation, Inc.
+   Copyright (C) 1991-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -325,7 +325,7 @@ validate_path (char *path, int portability)
       if (!last_elem)
        {
          exists = dir_ok (path);
-         if (dir_ok == 0)
+         if (exists == 0)
            {
              free (parent);
              return 1;