From d72b4409ce05e5604685fb8468068c8057315b2d Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 6 Dec 2022 11:43:26 +0100 Subject: 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. --- include/util/env.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/util') diff --git a/include/util/env.h b/include/util/env.h index 1edae0dd..e271f4bf 100644 --- a/include/util/env.h +++ b/include/util/env.h @@ -18,6 +18,6 @@ bool env_parse_bool(const char *option); * * switches is a NULL-terminated array. */ -ssize_t env_parse_switch(const char *option, const char **switches); +size_t env_parse_switch(const char *option, const char **switches); #endif -- cgit v1.2.3