diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-09 10:21:45 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:05:45 -0700 |
| commit | fd46a87b9e1d032863c41f54009e5e6386862f8b (patch) | |
| tree | d9eb25525e6fa4f8fe4f0e7b9ed6a83c8572b23f /compat/id-files-stat.c | |
| parent | 126ff5fb4364bdd6aed4f80e5feb1d402fbfae7a (diff) | |
| download | sparse-dev-fd46a87b9e1d032863c41f54009e5e6386862f8b.tar.gz | |
Remove stat-based file identity tests.
Replace it with a simple pathname comparison instead.
The pathname check is not only portable (no need for any
compatibility helper functions), but we can do it much
earlier, and thus make the check much cheaper by avoiding
three extra system calls when it triggers (open/fstat/close).
And the pathname test seems to match all the cases anyway.
Diffstat (limited to 'compat/id-files-stat.c')
| -rw-r--r-- | compat/id-files-stat.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compat/id-files-stat.c b/compat/id-files-stat.c deleted file mode 100644 index 62f0f57e..00000000 --- a/compat/id-files-stat.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "../token.h" -#include <sys/stat.h> - -int identical_files(struct stream* s, struct stat *st, const char * name) -{ - return s->dev == st->st_dev && s->ino == st->st_ino; -} |
