{"thread":{"id":"16318","subject":"[PATCH] revision.c: use proper data type in call to sizeof() within xrealloc","startedAt":"2008-11-13T20:20:37Z","lastAt":"2008-11-14T06:24:34Z","messageCount":2,"participants":["Brandon Casey","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"95724","messageId":"2NXgsahhUCpkej6JukLNJjebzyoAQgZ4ptQMMrR2j_iWS5yEqKYn0kxHsUBpiY6bkpfbTjxlSn0@cipher.nrlssc.navy.mil","threadId":"16318","inReplyTo":null,"subject":"[PATCH] revision.c: use proper data type in call to sizeof() within xrealloc","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-11-13T20:20:37Z","receivedAt":"2008-11-13T20:20:37Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"A type char** was being used instead of char*.\n---\n\n\nJust a little typo, that doesn't make any difference but should be fixed.\n\n-brandon\n\n\n revision.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex 2f646de..440d152 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -968,7 +968,7 @@ static void add_ignore_packed(struct rev_info *revs, const char *name)\n \tint num = ++revs->num_ignore_packed;\n \n \trevs->ignore_packed = xrealloc(revs->ignore_packed,\n-\t\t\t\t       sizeof(const char **) * (num + 1));\n+\t\t\t\t       sizeof(const char *) * (num + 1));\n \trevs->ignore_packed[num-1] = name;\n \trevs->ignore_packed[num] = NULL;\n }\n-- \n1.6.0.3.552.g12334\n"},{"id":"95764","messageId":"20081114062434.GA11907@coredump.intra.peff.net","threadId":"16318","inReplyTo":"2NXgsahhUCpkej6JukLNJjebzyoAQgZ4ptQMMrR2j_iWS5yEqKYn0kxHsUBpiY6bkpfbTjxlSn0@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] revision.c: use proper data type in call to sizeof() within xrealloc","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-11-14T06:24:34Z","receivedAt":"2008-11-14T06:24:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Nov 13, 2008 at 02:20:37PM -0600, Brandon Casey wrote:\n\n>  \tint num = ++revs->num_ignore_packed;\n>  \n>  \trevs->ignore_packed = xrealloc(revs->ignore_packed,\n> -\t\t\t\t       sizeof(const char **) * (num + 1));\n> +\t\t\t\t       sizeof(const char *) * (num + 1));\n\nMaybe it would be even nicer as \"sizeof(*revs->ignore_packed)\"?\n\n-Peff\n"}]}