Fix some reinitialization of prev!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2006-07-19 17:26:47 +00:00
parent a353387ea7
commit 2b30934535

View File

@@ -346,6 +346,7 @@ int ast_variable_delete(struct ast_category *category, char *variable)
cur = cur->next; cur = cur->next;
} }
prev = NULL;
cur = category->root; cur = category->root;
while (cur) { while (cur) {
if (!strcasecmp(cur->name, variable)) { if (!strcasecmp(cur->name, variable)) {
@@ -392,6 +393,7 @@ int ast_variable_update(struct ast_category *category, char *variable, char *val
cur = cur->next; cur = cur->next;
} }
prev = NULL;
cur = category->root; cur = category->root;
while (cur) { while (cur) {
if (!strcasecmp(cur->name, variable)) { if (!strcasecmp(cur->name, variable)) {
@@ -438,6 +440,8 @@ int ast_category_delete(struct ast_config *cfg, char *category)
prev = cat; prev = cat;
cat = cat->next; cat = cat->next;
} }
prev = NULL;
cat = cfg->root; cat = cfg->root;
while(cat) { while(cat) {
if (!strcasecmp(cat->name, category)) { if (!strcasecmp(cat->name, category)) {