- Timestamp:
- 08/08/05 20:43:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/reglookup.c
r48 r52 640 640 void printKeyTree(REGF_FILE* f, void_stack* nk_stack, char* prefix) 641 641 { 642 REGF_NK_REC* cur ;643 REGF_NK_REC* sub ;642 REGF_NK_REC* cur = NULL; 643 REGF_NK_REC* sub = NULL; 644 644 char* path = NULL; 645 645 char* val_path = NULL; … … 703 703 void_stack* path_stack) 704 704 { 705 REGF_NK_REC* sub ;706 REGF_NK_REC* cur ;705 REGF_NK_REC* sub = NULL; 706 REGF_NK_REC* cur = NULL; 707 707 void_stack* sub_nk_stack; 708 708 char* prefix; 709 uint32 prefix_len; 709 710 char* cur_str = NULL; 710 711 bool found_cur = true; … … 765 766 sub_nk_stack = void_stack_new(1024); 766 767 void_stack_push(sub_nk_stack, sub); 767 void_stack_push(nk_stack, sub);768 768 prefix = stack2Path(nk_stack); 769 prefix_len = strlen(prefix); 770 prefix = realloc(prefix, prefix_len+strlen(sub->keyname)+2); 771 if(prefix == NULL) 772 return -1; 773 strcat(prefix, "/"); 774 strcat(prefix, sub->keyname); 769 775 printKeyTree(f, sub_nk_stack, prefix); 770 776 return 0;
Note: See TracChangeset
for help on using the changeset viewer.