Thread (7 messages) 7 messages, 2 authors, 2025-11-04
STALE248d

[PATCH 3/5] parseopt: use boolean type for a simple flag

From: D. Ben Knoble <hidden>
Date: 2025-11-02 16:18:19
Subsystem: the rest · Maintainer: Linus Torvalds

Suggested-by: Phillip Wood <redacted>
Signed-off-by: D. Ben Knoble <redacted>
---
 parse-options.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/parse-options.c b/parse-options.c
index 6211b55a83..197c01987e 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -208,7 +208,7 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p,
 	case OPTION_FILENAME:
 	{
 		const char *value;
-		int is_optional;
+		bool is_optional;
 
 		if (unset)
 			value = NULL;
@@ -224,7 +224,7 @@ static enum parse_opt_result do_get_value(struct parse_opt_ctx_t *p,
 
 		is_optional = skip_prefix(value, ":(optional)", &value);
 		if (!value)
-			is_optional = 0;
+			is_optional = false;
 		value = fix_filename(p->prefix, value);
 		if (is_optional && is_missing_file(value)) {
 			free((char *)value);
-- 
2.48.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help