summaryrefslogtreecommitdiffstats
path: root/src/util/profile/prof_tree.c
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1999-03-08 19:45:10 +0000
committerTheodore Tso <tytso@mit.edu>1999-03-08 19:45:10 +0000
commitdd6376bbd15a0d124003d1b1f0ac51410704b445 (patch)
treec9fd3c68fd4822eaf8643550b16280b7c81270f9 /src/util/profile/prof_tree.c
parentbe95b52c2d0c21b1fe92f9f90166fc2fa8eecc95 (diff)
downloadkrb5-dd6376bbd15a0d124003d1b1f0ac51410704b445.tar.gz
krb5-dd6376bbd15a0d124003d1b1f0ac51410704b445.tar.xz
krb5-dd6376bbd15a0d124003d1b1f0ac51410704b445.zip
* prof_tree.c (profile_node_iterator): Fix bug where it will loop
endlessly when searching an empty section. * test_profile.c: Add code so that the "add" code will interpret "NULL" as calling profile_add_relation with a null pointer for the value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11245 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/profile/prof_tree.c')
-rw-r--r--src/util/profile/prof_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/profile/prof_tree.c b/src/util/profile/prof_tree.c
index 47160906a..77018bba7 100644
--- a/src/util/profile/prof_tree.c
+++ b/src/util/profile/prof_tree.c
@@ -476,7 +476,7 @@ errcode_t profile_node_iterator(iter_p, ret_node, ret_name, ret_value)
iter->node = 0;
}
get_new_file:
- while (iter->node == 0) {
+ if (iter->node == 0) {
if (iter->file == 0 ||
(iter->flags & PROFILE_ITER_FINAL_SEEN)) {
profile_node_iterator_free(iter_p);
@@ -513,7 +513,7 @@ get_new_file:
if (!section) {
iter->file = iter->file->next;
skip_num = 0;
- continue;
+ goto get_new_file;
}
iter->name = *cpp;
iter->node = section->first_child;