lxccontainer: do_lxcapi_is_running()

There's no need to do string comparisons. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent b0f533e2
......@@ -478,16 +478,10 @@ static bool is_stopped(struct lxc_container *c)
static bool do_lxcapi_is_running(struct lxc_container *c)
{
const char *s;
if (!c)
return false;
s = do_lxcapi_state(c);
if (!s || strcmp(s, "STOPPED") == 0)
return false;
return true;
return !is_stopped(c);
}
WRAP_API(bool, lxcapi_is_running)
......
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