aboutsummaryrefslogtreecommitdiff
path: root/util/env.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-12-06 11:43:26 +0100
committerSimon Ser <contact@emersion.fr>2022-12-06 16:14:18 +0100
commitd72b4409ce05e5604685fb8468068c8057315b2d (patch)
tree76ba844e4ed41913dc061dedd63f007e5c25ddd7 /util/env.c
parentdc09585d14b53f186d4be78126824faf27da55b8 (diff)
util/env: make env_parse_switch() return a size_t
This function is guaranteed to never return a negative value. This is important because we use arr[env_parse_switch(...)] in a few places.
Diffstat (limited to 'util/env.c')
-rw-r--r--util/env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/env.c b/util/env.c
index b0a9efda..77911a22 100644
--- a/util/env.c
+++ b/util/env.c
@@ -19,7 +19,7 @@ bool env_parse_bool(const char *option) {
return false;
}
-ssize_t env_parse_switch(const char *option, const char **switches) {
+size_t env_parse_switch(const char *option, const char **switches) {
const char *env = getenv(option);
if (env) {
wlr_log(WLR_INFO, "Loading %s option: %s", option, env);