Skip to content

Commit

Permalink
Get rid of local_enable variable
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed May 20, 2017
1 parent eec0613 commit 0742ebe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@

struct command
{
bool local_enable;
#ifdef HAVE_STDIN_CMD
bool stdin_enable;
char stdin_buf[STDIN_BUF_SIZE];
Expand Down Expand Up @@ -540,14 +539,12 @@ static bool command_stdin_init(command_t *handle)
}
#endif

command_t *command_new(bool local_enable)
command_t *command_new(void)
{
command_t *handle = (command_t*)calloc(1, sizeof(*handle));
if (!handle)
return NULL;

handle->local_enable = local_enable;

return handle;
}

Expand Down
2 changes: 1 addition & 1 deletion command.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ bool command_network_new(
bool network_enable,
uint16_t port);

command_t *command_new(bool local_enable);
command_t *command_new(void);

bool command_poll(command_t *handle);

Expand Down
2 changes: 1 addition & 1 deletion input/input_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ bool input_driver_init_command(void)
"Cannot use this command interface.\n");
}

input_driver_command = command_new(false);
input_driver_command = command_new();

if (command_network_new(
input_driver_command,
Expand Down

0 comments on commit 0742ebe

Please sign in to comment.