Skip to content

Commit

Permalink
sol: set boolean variables in processSolUserInput
Browse files Browse the repository at this point in the history
Use boolean variable types in processSolUserInput instead of treating
ints as bools.

Signed-off-by: Patrick Venture <venture@google.com>
  • Loading branch information
pstrinkle committed Dec 10, 2018
1 parent d827799 commit ad50bbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ipmi_sol.c
Expand Up @@ -1318,8 +1318,8 @@ int
processSolUserInput(struct ipmi_intf *intf, uint8_t *input,
uint16_t buffer_length)
{
static int escape_pending = 0;
static int last_was_cr = 1;
static bool escape_pending = false;
static bool last_was_cr = true;
struct ipmi_v2_payload v2_payload;
int length = 0;
int retval = 0;
Expand All @@ -1336,7 +1336,7 @@ processSolUserInput(struct ipmi_intf *intf, uint8_t *input,
ch = input[i];

if (escape_pending) {
escape_pending = 0;
escape_pending = false;

/*
* Process a possible escape sequence.
Expand Down Expand Up @@ -1384,7 +1384,7 @@ processSolUserInput(struct ipmi_intf *intf, uint8_t *input,
else {
if (last_was_cr
&& (ch == intf->ssn_params.sol_escape_char)) {
escape_pending = 1;
escape_pending = true;
continue;
}

Expand Down

0 comments on commit ad50bbe

Please sign in to comment.