~mdw
/
sgt
/
agedu
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
13a9230
)
Reposition r8253's change to avoid redundant index lookups.
author
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 2 Nov 2008 11:35:08 +0000
(11:35 +0000)
committer
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 2 Nov 2008 11:35:08 +0000
(11:35 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/agedu@8254
cda61777
-01e9-0310-a592-
d414129be87e
agedu.c
patch
|
blob
|
blame
|
history
diff --git
a/agedu.c
b/agedu.c
index
abcf623
..
68a9799
100644
(file)
--- a/
agedu.c
+++ b/
agedu.c
@@
-173,15
+173,15
@@
static void text_query(const void *mappedfile, const char *querydir,
xi1 = trie_before(mappedfile, querydir);
xi2 = trie_before(mappedfile, pathbuf);
+ if (xi2 - xi1 == 1)
+ return; /* file, or empty dir => no display */
+
/*
* Now do the lookups in the age index.
*/
s1 = index_query(mappedfile, xi1, t);
s2 = index_query(mappedfile, xi2, t);
- if (xi2 - xi1 == 1)
- return; /* file, or empty dir => no display */
-
if (s1 == s2)
return; /* no space taken up => no display */