From a8bbb21eeb5bcdab5eb71be3793c6efd3dd0622d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 29 Mar 2023 10:09:01 -0500 Subject: [PATCH] Use short-circuiting or (also may save some code size) Co-authored-by: Dan Halbert --- shared-module/os/getenv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/os/getenv.c b/shared-module/os/getenv.c index 6585aeb88c..76cbf48dae 100644 --- a/shared-module/os/getenv.c +++ b/shared-module/os/getenv.c @@ -72,7 +72,7 @@ STATIC void close_file(file_arg *active_file) { // nothing } STATIC bool is_eof(file_arg *active_file) { - return f_eof(active_file) | f_error(active_file); + return f_eof(active_file) || f_error(active_file); } // Return 0 if there is no next character (EOF).