From 439358bfe473a222ef64bf98efd29b1c35853605 Mon Sep 17 00:00:00 2001 From: Michel Normand Date: Thu, 28 May 2009 15:32:29 +0200 Subject: [PATCH] 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 --- src/lxc/lxc_wait.c | 5 ++--- src/lxc/state.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) 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; } -- 2.39.2