summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2024-01-11 11:58:40 +0100
committerDudemanguy <random342@airmail.cc>2024-02-04 15:12:02 +0000
commit68e3412feeab5c8b0c70d5799c3721532af85c35 (patch)
tree940912090a6aaa502959197c83b6a552d9098b33 /input
parent484ab32a4124fe718bb1f18da689bd4082090323 (diff)
downloadmpv-68e3412feeab5c8b0c70d5799c3721532af85c35.tar.bz2
mpv-68e3412feeab5c8b0c70d5799c3721532af85c35.tar.xz
input: make parse_config_file return bool
This return value is only used to set bool config_ok in mp_input_load_config so it makes more sense to return bool.
Diffstat (limited to 'input')
-rw-r--r--input/input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/input/input.c b/input/input.c
index 77661feef3..4c8d8211db 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1276,9 +1276,9 @@ static int parse_config(struct input_ctx *ictx, bool builtin, bstr data,
return n_binds;
}
-static int parse_config_file(struct input_ctx *ictx, char *file)
+static bool parse_config_file(struct input_ctx *ictx, char *file)
{
- int r = 0;
+ bool r = false;
void *tmp = talloc_new(NULL);
stream_t *s = NULL;
@@ -1295,7 +1295,7 @@ static int parse_config_file(struct input_ctx *ictx, char *file)
MP_VERBOSE(ictx, "Parsing input config file %s\n", file);
int num = parse_config(ictx, false, data, file, NULL);
MP_VERBOSE(ictx, "Input config file %s parsed: %d binds\n", file, num);
- r = 1;
+ r = true;
} else {
MP_ERR(ictx, "Error reading input config file %s\n", file);
}