summaryrefslogtreecommitdiff
path: root/src/trg-file-parser.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-10 09:46:13 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-10 09:46:13 +0000
commit8d986c31c7d47c2c6f8c5e2eab34b6467ed9365e (patch)
tree3fba59acdeef96c1f511904f5328707c785d11ad /src/trg-file-parser.c
parent19571b677ec4a1c3fd488b4f0d4084d011729bfa (diff)
invalidate previous files path iterator if something doesn't match, to avoid unnecessary checks.
Diffstat (limited to 'src/trg-file-parser.c')
-rw-r--r--src/trg-file-parser.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/trg-file-parser.c b/src/trg-file-parser.c
index 3353cd9..da34a5a 100644
--- a/src/trg-file-parser.c
+++ b/src/trg-file-parser.c
@@ -60,10 +60,12 @@ static trg_files_tree_node
trg_files_tree_node *lastPathNode =
(trg_files_tree_node *) li->data;
- if (!g_strcmp0(lastPathNode->name, path_el_node->val.s))
+ if (!g_strcmp0(lastPathNode->name, path_el_node->val.s)) {
target_node = lastPathNode;
-
- li = g_list_next(li);
+ li = g_list_next(li);
+ } else {
+ li = NULL;
+ }
}
if (!target_node) {