You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by re...@apache.org on 2026/01/16 21:34:46 UTC
(cloudberry) 01/01: Do not initialize programm query string when unneeded.
This is an automated email from the ASF dual-hosted git repository.
reshke pushed a commit to branch reshke-patch-2
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 62330090bac36cdce6064bb445a957e3828f03ca
Author: reshke <re...@double.cloud>
AuthorDate: Sat Jan 17 02:34:39 2026 +0500
Do not initialize programm query string when unneeded.
Also, while on it, beautify code to conform PG-style coding.
Per coverity report 544476
---
src/backend/commands/copy.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index efbf6a0ba39..4ccd3798067 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -1420,20 +1420,17 @@ close_program_pipes(ProgramPipes *program_pipes, bool ifThrow)
{
int ret = 0;
StringInfoData sinfo;
- initStringInfo(&sinfo);
/* just return if pipes not created, like when relation does not exist */
if (!program_pipes)
- {
return;
- }
+
+ initStringInfo(&sinfo);
ret = pclose_with_stderr(program_pipes->pid, program_pipes->pipes, &sinfo);
if (ret == 0 || !ifThrow)
- {
return;
- }
if (ret == -1)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org