diff mbox series

[13/13] Handled git pipeline errors - z/OS enable

Message ID 804624950aee9112b2ba88dd8f489b91a5392ad3.1699871056.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Enabling z/OS workflow for git | expand

Commit Message

Haritha D Nov. 13, 2023, 10:24 a.m. UTC
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 | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/convert.c b/convert.c
index 4c034bb714c..c66f5b3ecec 100644
--- a/convert.c
+++ b/convert.c
@@ -1315,7 +1315,6 @@  static struct attr_check *check;
 
 static void get_platform(char** result) {
 	struct utsname uname_info;
-	*result = NULL;
 
 	if (uname(&uname_info) < 0)
 		die(_("uname() failed with error '%s' (%d)\n"),
@@ -1346,11 +1345,10 @@  void convert_attrs(struct index_state *istate,
 {
 	struct attr_check_item *ccheck = NULL;
 	struct strbuf platform_working_tree_encoding = STRBUF_INIT;
-	char* result=NULL;
+	char* result="Unknown";
 	get_platform(&result);
 	strbuf_addf(&platform_working_tree_encoding, "%s-working-tree-encoding", result);
-	if (result != NULL)
-		free (result);
+	free (result);
 
 	if (!check) {
 		check = attr_check_initl("crlf", "ident", "filter",