Skip to content

Commit

Permalink
make the tests pass when readline isn't used
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Mar 7, 2020
1 parent 03d3c8a commit 6c0ae83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/proto_control/radmin.c
Expand Up @@ -493,17 +493,19 @@ static char *my_readline(char const *prompt, FILE *fp_in, FILE *fp_out)
return line;
}

#ifdef USE_READLINE
static void radmin_free(char *line)
{
#ifdef USE_READLINE
/*
* Was read from stdin, so "line" == "readline_buffer"
*/
if (!use_readline) return;
#endif

free(line);
}
#else
#define radmin_free(_x)
#endif

/*
* Copies the (possible partial) command to the command buffer,
Expand Down

0 comments on commit 6c0ae83

Please sign in to comment.