From: Haritha D <harithamma.d@xxxxxxx> This PR has fixes to enable build on z/OS Signed-off-by: Harithamma D <harithamma.d@xxxxxxx> --- convert.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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", -- gitgitgadget