git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] submodule: don't use an integer as a NULL pointer

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Feb 21, 2016, 17:27 UTC
Message-ID
<56C9F370.3020802@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Stefan,

If you need to re-roll your 'sb/submodule-init' branch, could you please squash this into the relevant patch.

Thanks!

ATB, Ramsay Jones

 submodule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/submodule.c b/submodule.c
index 30c393b..ccafd45 100644
--- a/submodule.c
+++ b/submodule.c
@@ -253,7 +253,7 @@ const char *submodule_strategy_to_string(const struct submodule_update_strategy
 		return NULL;
 	case SM_UPDATE_COMMAND:
 		strbuf_addf(&sb, "!%s", s->command);
-		return strbuf_detach(&sb, 0);
+		return strbuf_detach(&sb, NULL);
 	}
 	return NULL;
 }
-- 
2.7.0
Message 1 of 1 in “submodule: don't use an integer as a NULL pointer”
  1. submodule: don't use an integer as a NULL pointerRamsay Jones, Feb 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.