threads / patch / 41456

patchsubmodule: don't use an integer as a NULL pointer

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

## tl;dr

One message between Feb 21, 2016 and Feb 21, 2016. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ramsay Jones· Feb 21, 2016, 17:27 UTC · lore
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(-)
Show changes to submodule.c +1 −1
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

← back to recent threads