argv-array: fix bogus cast when freeing array

Since the array struct stores a "const char **" argv member (for compatibility with most of our argv-taking functions), we have to cast away the const-ness when freeing its elements. However, we used the wrong type when doing so. It doesn't make a difference since free() take a void pointer anyway, but it can be slightly confusing to a reader. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Sep 1, 2012 at 07:34 UTC ba4d1c7b1623b2c7ec198aee08036acf779375e6
1 file changed +1 -1
argv-array.c
+1 -1
@@ -63,7 +63,7 @@ void argv_array_clear(struct argv_array *array)
63 if (array->argv != empty_argv) {
64 int i;
65 for (i = 0; i < array->argc; i++)
66 - free((char **)array->argv[i]);
66 + free((char *)array->argv[i]);
67 free(array->argv);
68 }
69 argv_array_init(array);