input: minor simplification

This commit is contained in:
wm4 2012-11-01 00:52:07 +01:00
parent cb77400006
commit 1809cbcc90
1 changed files with 1 additions and 2 deletions

View File

@ -1721,13 +1721,12 @@ static int parse_config(struct input_ctx *ictx, bool builtin, bstr data,
static int parse_config_file(struct input_ctx *ictx, char *file)
{
struct bstr res = {0};
stream_t *s = open_stream(file, NULL, NULL);
if (!s) {
mp_msg(MSGT_INPUT, MSGL_V, "Can't open input config file %s.\n", file);
return 0;
}
res = stream_read_complete(s, NULL, 1000000, 0);
bstr res = stream_read_complete(s, NULL, 1000000, 0);
free_stream(s);
mp_msg(MSGT_INPUT, MSGL_V, "Parsing input config file %s\n", file);
int n_binds = parse_config(ictx, false, res, file);