From: Michel Normand Date: Thu, 28 May 2009 13:32:29 +0000 (+0200) Subject: avoid two times error msg about invalid state X-Git-Tag: lxc_0_6_3~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=439358bfe473a222ef64bf98efd29b1c35853605;p=thirdparty%2Flxc.git avoid two times error msg about invalid state remove an error message in lxc_wait.c that duplicate an already existing error message in state.c Signed-off-by: Michel Normand Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/lxc_wait.c b/src/lxc/lxc_wait.c index 2d0f93cdc..bc1bb0621 100644 --- a/src/lxc/lxc_wait.c +++ b/src/lxc/lxc_wait.c @@ -79,10 +79,9 @@ static int fillwaitedstates(char *strstates, int *states) while (token) { state = lxc_str2state(token); - if (state < 0) { - ERROR("invalid state %s", token); + if (state < 0) return -1; - } + states[state] = 1; token = strtok_r(NULL, "|", &saveptr); diff --git a/src/lxc/state.c b/src/lxc/state.c index 511b1bfe1..a817a53a6 100644 --- a/src/lxc/state.c +++ b/src/lxc/state.c @@ -56,7 +56,7 @@ lxc_state_t lxc_str2state(const char *state) if (!strcmp(strstate[i], state)) return i; - ERROR("invalid specified state %s", state); + ERROR("invalid state '%s'", state); return -1; }