Skip to content

Commit

Permalink
nanny: fixed endless loop on policies without name
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomaschewski committed Apr 2, 2014
1 parent 058f194 commit 743cac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nanny/nanny.c
Expand Up @@ -640,7 +640,7 @@ ni_objectmodel_nanny_create_policy(ni_dbus_object_t *object, const ni_dbus_metho

do {
snprintf(namebuf, sizeof(namebuf), "policy%u", counter++);
} while (ni_fsm_policy_by_name(mgr->fsm, namebuf) == NULL);
} while (ni_fsm_policy_by_name(mgr->fsm, namebuf) && counter);
name = namebuf;
}

Expand Down

0 comments on commit 743cac7

Please sign in to comment.