v1-0001-guc-make-dereference-style-consistent-in-check_ba.patch

application/octet-stream

Filename: v1-0001-guc-make-dereference-style-consistent-in-check_ba.patch
Type: application/octet-stream
Part: 0
Message: guc: make dereference style consistent in check_backtrace_functions

Patch

Format: format-patch
Series: patch v1-0001
Subject: guc: make dereference style consistent in check_backtrace_functions
File+
src/backend/utils/error/elog.c 1 1
From 85919fa8f4500be466dbc2e0a37072e1b8732700 Mon Sep 17 00:00:00 2001
From: zhanghu <kongbaik228@gmail.com>
Date: Thu, 26 Feb 2026 14:54:22 +0800
Subject: [PATCH v1] guc: make dereference style consistent in
 check_backtrace_functions

In check_backtrace_functions(), the empty-string check is currently
implemented as:

    if (*newval[0] == '\0')

while the rest of the function consistently accesses the string as

    (*newval)[i]

This patch rewrites the check as:

    if ((*newval)[0] == '\0')

This change ensures semantic clarity and maintains a consistent
dereferencing style throughout the function. No functional changes
are introduced.

Author: zhanghu <kongbaik228@gmail.com>
---
 src/backend/utils/error/elog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 0d0bf0f6aa5..650a79b7e12 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -2627,7 +2627,7 @@ check_backtrace_functions(char **newval, void **extra, GucSource source)
 		return false;
 	}
 
-	if (*newval[0] == '\0')
+	if ((*newval)[0] == '\0')
 	{
 		*extra = NULL;
 		return true;
-- 
2.33.0