xpp: Fix a logical not being applied to the wrong operand
authorRuss Meyerriecks <rmeyerriecks@digium.com>
Wed, 17 Jun 2015 16:36:16 +0000 (11:36 -0500)
committerRuss Meyerriecks <rmeyerriecks@digium.com>
Mon, 22 Jun 2015 18:45:54 +0000 (13:45 -0500)
gcc 5 found this with the new -Werror=logical-not-parenthesis warning. Since we
have -Wall by default, it would also fail the compile.

Internal-Issue-ID: DAHLIN-347

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

xpp/mpptalk.c

index e49c3cd..9bab867 100644 (file)
@@ -512,7 +512,7 @@ int mpp_send_seg(struct astribank_device *astribank, const uint8_t *data, uint16
 
        assert(astribank != NULL);
        xtalk_dev = astribank->xtalk_dev;
 
        assert(astribank != NULL);
        xtalk_dev = astribank->xtalk_dev;
-       if(!astribank->burn_state == BURN_STATE_STARTED) {
+       if(astribank->burn_state != BURN_STATE_STARTED) {
                ERR("Tried to send a segment while burn_state=%d\n",
                                astribank->burn_state);
                return -EINVAL;
                ERR("Tried to send a segment while burn_state=%d\n",
                                astribank->burn_state);
                return -EINVAL;