openocd: fix simple cases of Yoda condition
[fw/openocd] / src / hello.c
index a1c00c0ddf121d682e789c71671e40d87294a782..9d078c0e776cbc2f455a5b4662edefcbdb223560 100644 (file)
@@ -88,7 +88,7 @@ COMMAND_HANDLER(handle_hello_command)
 {
        const char *sep, *name;
        int retval = CALL_COMMAND_HANDLER(handle_hello_args, &sep, &name);
-       if (ERROR_OK == retval)
+       if (retval == ERROR_OK)
                command_print(CMD, "Greetings%s%s!", sep, name);
        return retval;
 }