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
+Mon Mar 8 14:38:24 1999 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * 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.
+
Wed Mar 3 18:23:47 1999 Theodore Y. Ts'o <tytso@mit.edu>
* prof_file.c (profile_flush_file): On the Macintosh, fopen()
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);
if (!section) {
iter->file = iter->file->next;
skip_num = 0;
- continue;
+ goto get_new_file;
}
iter->name = *cpp;
iter->node = section->first_child;
retval = profile_rename_section(profile, names+1,
*names);
} else if (!strcmp(cmd, "add")) {
+ value = *names;
+ if (strcmp(value, "NULL") == 0)
+ value = NULL;
retval = profile_add_relation(profile, names+1,
- *names);
+ value);
} else if (!strcmp(cmd, "flush")) {
retval = profile_flush(profile);
} else {