From 210f4f8fbaece0b28d5e549c71fa96fc72e86cf5 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 26 Nov 2018 16:43:01 -0700 Subject: [PATCH] init: fix grammar and clarify comment --- src/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/init.c b/src/init.c index 0deae84..db237d4 100644 --- a/src/init.c +++ b/src/init.c @@ -30,7 +30,11 @@ static BOOL CALLBACK init__once_callback(INIT_ONCE* once, int init(void) { if (!init__done && !InitOnceExecuteOnce(&init__once, init__once_callback, NULL, NULL)) - return -1; /* LastError and errno aren't touched InitOnceExecuteOnce. */ + /* `InitOnceExecuteOnce()` itself is infallible, and it doesn't set any + * error code when the once-callback returns FALSE. We return -1 here to + * indicate that global initialization failed; the failing init function is + * resposible for setting `errno` and calling `SetLastError()`. */ + return -1; return 0; }