state: _never_ return NULL from lxc_state2str()

Cc: Thomas Parrott <thomas.parrott@canonical.com> Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent c674e0f6
......@@ -36,7 +36,7 @@ static const char *const strstate[] = {
const char *lxc_state2str(lxc_state_t state)
{
if (state < STOPPED || state > MAX_STATE - 1)
return NULL;
return "INVALID STATE";
return strstate[state];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment