git: bd4dd5d951ea - main - libc: some style in gai_strerror.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Aug 2025 21:26:42 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=bd4dd5d951ea022b478c455c3eabb2a1b8cc4936
commit bd4dd5d951ea022b478c455c3eabb2a1b8cc4936
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-08-19 03:00:11 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-08-19 21:22:35 +0000
libc: some style in gai_strerror.c
Reviewed by: emaste, glebius
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D52010
---
lib/libc/net/gai_strerror.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/libc/net/gai_strerror.c b/lib/libc/net/gai_strerror.c
index 8d3501197c73..96bc32b593fa 100644
--- a/lib/libc/net/gai_strerror.c
+++ b/lib/libc/net/gai_strerror.c
@@ -72,7 +72,7 @@ static int gai_keycreated = 0;
static void
gai_keycreate(void)
{
- gai_keycreated = (thr_keycreate(&gai_key, free) == 0);
+ gai_keycreated = thr_keycreate(&gai_key, free) == 0;
}
#endif
@@ -110,11 +110,11 @@ gai_strerror(int ecode)
strlcpy(buf, catgets(catd, 3, NL_MSGMAX, "Unknown error"),
sizeof(gai_buf));
catclose(catd);
- return buf;
+ return (buf);
thr_err:
#endif
if (ecode >= 0 && ecode < EAI_MAX)
- return ai_errlist[ecode];
- return "Unknown error";
+ return (ai_errlist[ecode]);
+ return ("Unknown error");
}