]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
avoid two times error msg about invalid state
authorMichel Normand <normand@fr.ibm.com>
Thu, 28 May 2009 13:32:29 +0000 (15:32 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 28 May 2009 13:32:29 +0000 (15:32 +0200)
remove an error message in lxc_wait.c that duplicate
an already existing error message in state.c

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_wait.c
src/lxc/state.c

index 2d0f93cdc09f5336e34bb39b121b86ea73d293ce..bc1bb0621697c81b06492bb3e21a6db9fe1dbee6 100644 (file)
@@ -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);
index 511b1bfe1447e8f9308114bc3d04120d97e31d3d..a817a53a61fec630f0b2b2f85fbb0a3a2d55f685 100644 (file)
@@ -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;
 }