tmp = var;
while(tmp) {
- if (strcasecmp(tmp->name, "type"))
- continue;
-
- if (!strcasecmp(tmp->value, "user")) {
+ if (!strcasecmp(tmp->name, "type") &&
+ !strcasecmp(tmp->value, "user")) {
ast_destroy_realtime(var);
return NULL;
}
-
tmp = tmp->next;
}
tmp = var;
while (tmp) {
- if (strcasecmp(tmp->name, "type"))
- continue;
-
- if (!strcasecmp(tmp->value, "peer")) {
+ if (!strcasecmp(tmp->name, "type") &&
+ !strcasecmp(tmp->value, "peer")) {
ast_destroy_realtime(var);
return NULL;
}