lxc_log_setprefix(prefix);
if (file && strcmp(file, "none") == 0) {
- want_lxc_log_specified = 1;
return 0;
}
}
/*
- * Helper macro to define log fonctions.
+ * Helper macro to define log functions.
*/
#define lxc_log_priority_define(acategory, PRIORITY) \
\
newargv[nargs - 1] = NULL;
/* execute */
- ret = execv(tpath, newargv);
+ execv(tpath, newargv);
SYSERROR("failed to execute template %s", tpath);
exit(1);
}
if (pid < 0)
return false;
if (pid == 0) { // child
- ret = execlp("lxc-destroy", "lxc-destroy", "-n", c->name, "-P", c->config_path, NULL);
+ execlp("lxc-destroy", "lxc-destroy", "-n", c->name, "-P", c->config_path, NULL);
perror("execl");
exit(1);
}
err = netlink_send(&nlh, nlmsg);
if (err < 0)
goto out;
- err = 0;
do {
/* Restore the answer buffer length, it might have been
lxc_state_t lxc_str2state(const char *state)
{
- int i, len;
+ size_t len;
+ lxc_state_t i;
len = sizeof(strstate)/sizeof(strstate[0]);
for (i = 0; i < len; i++)
if (!strcmp(strstate[i], state))
return -1;
}
-static int freezer_state(const char *name, const char *lxcpath)
+static lxc_state_t freezer_state(const char *name, const char *lxcpath)
{
char *nsgroup;
char freezer[MAXPATHLEN];
lxc_state_t lxc_getstate(const char *name, const char *lxcpath)
{
- int state = freezer_state(name, lxcpath);
+ lxc_state_t state = freezer_state(name, lxcpath);
if (state != FROZEN && state != FREEZING)
state = __lxc_getstate(name, lxcpath);
return state;