From: "Haritha D via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Haritha <harithamma.d@ibm.com>, Haritha D <harithamma.d@ibm.com>
Subject: [PATCH 10/13] strncpy fix Handled git pipeline errors
Date: Mon, 13 Nov 2023 10:24:12 +0000 [thread overview]
Message-ID: <63479fe36966bf3b1a8dbc3ae68f8558da4690bc.1699871056.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1537.git.git.1699871056.gitgitgadget@gmail.com>
From: Haritha D <harithamma.d@ibm.com>
This PR has fixes to enable build on z/OS
Signed-off-by: Harithamma D <harithamma.d@ibm.com>
---
convert.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/convert.c b/convert.c
index 78403de422d..ef44e6429da 100644
--- a/convert.c
+++ b/convert.c
@@ -1326,13 +1326,10 @@ static const char* get_platform(void) {
{
int index=0;
result = (char *)malloc(strlen(uname_info.sysname)+1);
- while(index <= strlen(uname_info.sysname))
+ while(result[index] = uname_info.sysname[index])
{
- *result = uname_info.sysname[index];
- ++result;
- ++index;
+ index++;
}
- *result = '\0';
}
#endif
@@ -1340,8 +1337,7 @@ static const char* get_platform(void) {
if (!strcmp(uname_info.sysname, "OS/390"))
result="zos";
#endif
-
- return result;
+ return (char*)result;
}
--
gitgitgadget
next prev parent reply other threads:[~2023-11-13 10:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 10:24 [PATCH 00/13] Enabling z/OS workflow for git Haritha via GitGitGadget
2023-11-13 10:24 ` [PATCH 01/13] " Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 02/13] Enable builds for z/OS Haritha D via GitGitGadget
2023-11-13 23:03 ` brian m. carlson
2023-11-14 1:47 ` Junio C Hamano
2023-11-14 0:48 ` Junio C Hamano
2023-11-13 10:24 ` [PATCH 03/13] spaces and errors fix Handled git pipeline errors Haritha D via GitGitGadget
2023-11-14 0:38 ` Junio C Hamano
2023-11-13 10:24 ` [PATCH 04/13] fixes for build errors Handled git pipeline errorse Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 05/13] fixes for build errors Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 06/13] spaces and errors fix Handled git pipeline errors Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 07/13] " Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 08/13] platform_name " Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 09/13] strncpy " Haritha D via GitGitGadget
2023-11-13 10:24 ` Haritha D via GitGitGadget [this message]
2023-11-13 10:24 ` [PATCH 11/13] " Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 12/13] Handled git pipeline errors - Memory leak Haritha D via GitGitGadget
2023-11-13 10:24 ` [PATCH 13/13] Handled git pipeline errors - z/OS enable Haritha D via GitGitGadget
2023-12-04 14:19 ` [PATCH v2] This PR enables a successful git build on z/OS Haritha via GitGitGadget
2023-12-04 21:46 ` Eric Sunshine
2023-12-05 20:58 ` René Scharfe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63479fe36966bf3b1a8dbc3ae68f8558da4690bc.1699871056.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=harithamma.d@ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).