Browse Source

avoid struct stat

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43076 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 years ago
parent
commit
b8d6dcddfa
1 changed files with 1 additions and 2 deletions
  1. 1 2
      lib/gis/tempfile.c

+ 1 - 2
lib/gis/tempfile.c

@@ -73,7 +73,6 @@ char *G__tempfile(int pid)
     char path[GPATH_MAX];
     char name[GNAME_MAX];
     char element[100];
-    struct stat st;
 
     if (pid <= 0)
 	pid = getpid();
@@ -84,7 +83,7 @@ char *G__tempfile(int pid)
 	sprintf(name, "%d.%d", pid, uniq);
 	G__file_name(path, element, name, G_mapset());
     }
-    while (stat(path, &st) == 0);
+    while (access(path, F_OK) == 0);
 
     return G_store(path);
 }