Fixed a minor typo in code comment

Started by Chao Li5 months ago5 messages
#1Chao Li
lic@highgo.com
1 attachment(s)

Hi,

I didn’t intend to modify the module, but noticed the typo while searching through the code. Submitting a patch to correct it.

I ran a basic test of “make check” and the test passed.

Chao Li (Evan)
--------------------
HighGo Infra. Software Inc.
https://www.highgo.com/

Attachments:

v1-0001-Fix-a-minor-typo-in-code-comment.patchapplication/octet-stream; name=v1-0001-Fix-a-minor-typo-in-code-comment.patch; x-unix-mode=0644Download
From da50bababf8bebfe1dcc0020360b148bc5a139bb Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Wed, 6 Aug 2025 07:04:28 +0800
Subject: [PATCH v1] Fix a minor typo in code comment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

I didn’t intend to modify this module, but noticed the typo while
searching through the code. Submitting a patch to correct it.

Author: Chao Li <lic@highgo.com>
---
 src/interfaces/ecpg/compatlib/informix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index e829d722f22..5c44e771af2 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -808,7 +808,7 @@ rfmtlong(long lng_val, const char *fmt, char *outbuf)
 		brackets_ok = 1;
 
 	/* get position of the right-most dot in the format-string */
-	/* and fill the temp-string wit '0's up to there. */
+	/* and fill the temp-string with '0's up to there. */
 	dotpos = getRightMostDot(fmt);
 
 	/* start to parse the format-string */
-- 
2.39.5 (Apple Git-154)

#2厉超
lic@highgo.com
In reply to: Chao Li (#1)
1 attachment(s)
Re: Fixed a minor typo in code comment

Looks like the attachment was missing from the original email, adding the attachment.

-----原始邮件-----
发件人:"Chao Li" <lic@highgo.com>
发送时间:2025-08-06 07:10:32 (星期三)

收件人: pgsql-hackers@postgresql.org
主题: Fixed a minor typo in code comment

Hi,

I didn’t intend to modify the module, but noticed the typo while searching through the code. Submitting a patch to correct it.

I ran a basic test of “make check” and the test passed.

Chao Li (Evan)
--------------------
HighGo Infra. Software Inc.
https://www.highgo.com/

Attachments:

v1-0001-Fix-a-minor-typo-in-code-comment.patchapplication/octet-stream; name=v1-0001-Fix-a-minor-typo-in-code-comment.patch; x-unix-mode=0644Download
From da50bababf8bebfe1dcc0020360b148bc5a139bb Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Wed, 6 Aug 2025 07:04:28 +0800
Subject: [PATCH v1] Fix a minor typo in code comment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

I didn’t intend to modify this module, but noticed the typo while
searching through the code. Submitting a patch to correct it.

Author: Chao Li <lic@highgo.com>
---
 src/interfaces/ecpg/compatlib/informix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index e829d722f22..5c44e771af2 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -808,7 +808,7 @@ rfmtlong(long lng_val, const char *fmt, char *outbuf)
 		brackets_ok = 1;
 
 	/* get position of the right-most dot in the format-string */
-	/* and fill the temp-string wit '0's up to there. */
+	/* and fill the temp-string with '0's up to there. */
 	dotpos = getRightMostDot(fmt);
 
 	/* start to parse the format-string */
-- 
2.39.5 (Apple Git-154)

#3Fujii Masao
masao.fujii@gmail.com
In reply to: Chao Li (#1)
1 attachment(s)
Re: Fixed a minor typo in code comment

On Wed, Aug 6, 2025 at 8:11 AM Chao Li <lic@highgo.com> wrote:

Hi,

I didn’t intend to modify the module, but noticed the typo while searching through the code. Submitting a patch to correct it.

I ran a basic test of “make check” and the test passed.

Thanks for the patch! LGTM.

The comment doesn't follow our usual style. How about adjusting it to
match our typical format while fixing the typo? I've attached
the updated version of the patch.

Regards,

--
Fujii Masao

Attachments:

v2-0001-Fix-typo-in-comment.patchapplication/octet-stream; name=v2-0001-Fix-typo-in-comment.patchDownload
From 68d6a4daf223117bd0f12e9615144e3e300c8327 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Wed, 6 Aug 2025 13:07:38 +0900
Subject: [PATCH v2] Fix typo in comment.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CD9B2247-617A-4761-8338-2705C8728E2A@highgo.com
---
 src/interfaces/ecpg/compatlib/informix.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index e829d722f22..ca11a81f1bc 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -807,8 +807,10 @@ rfmtlong(long lng_val, const char *fmt, char *outbuf)
 	if (strchr(fmt, (int) '(') && strchr(fmt, (int) ')'))
 		brackets_ok = 1;
 
-	/* get position of the right-most dot in the format-string */
-	/* and fill the temp-string wit '0's up to there. */
+	/*
+	 * get position of the right-most dot in the format-string and fill the
+	 * temp-string with '0's up to there.
+	 */
 	dotpos = getRightMostDot(fmt);
 
 	/* start to parse the format-string */
-- 
2.50.1

#4Chao Li
lic@highgo.com
In reply to: Fujii Masao (#3)
Re: Fixed a minor typo in code comment

I am fine with that, and thanks for the v2 patch.

Chao Li (Evan)
--------------------
HighGo Infra. Software Inc.
https://www.highgo.com/

Show quoted text

On Aug 6, 2025, at 12:11, Fujii Masao <masao.fujii@gmail.com> wrote:

On Wed, Aug 6, 2025 at 8:11 AM Chao Li <lic@highgo.com> wrote:

Hi,

I didn’t intend to modify the module, but noticed the typo while searching through the code. Submitting a patch to correct it.

I ran a basic test of “make check” and the test passed.

Thanks for the patch! LGTM.

The comment doesn't follow our usual style. How about adjusting it to
match our typical format while fixing the typo? I've attached
the updated version of the patch.

Regards,

--
Fujii Masao
<v2-0001-Fix-typo-in-comment.patch>

#5Fujii Masao
masao.fujii@gmail.com
In reply to: Chao Li (#4)
Re: Fixed a minor typo in code comment

On Wed, Aug 6, 2025 at 1:17 PM Chao Li <lic@highgo.com> wrote:

I am fine with that, and thanks for the v2 patch.

I've pushed the patch. Thanks!

Regards,

--
Fujii Masao