Code

revision.c: use proper data type in call to sizeof() within xrealloc
authorBrandon Casey <casey@nrlssc.navy.mil>
Thu, 13 Nov 2008 20:20:37 +0000 (14:20 -0600)
committerJunio C Hamano <gitster@pobox.com>
Sat, 15 Nov 2008 05:41:19 +0000 (21:41 -0800)
A type char** was being used instead of char*.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c

index 270294af8321c0b81f720db0f36e8f7f9eddbc88..45fd7a366055d254529c53b21a06c6340427fa49 100644 (file)
@@ -968,7 +968,7 @@ static void add_ignore_packed(struct rev_info *revs, const char *name)
        int num = ++revs->num_ignore_packed;
 
        revs->ignore_packed = xrealloc(revs->ignore_packed,
-                                      sizeof(const char **) * (num + 1));
+                                      sizeof(const char *) * (num + 1));
        revs->ignore_packed[num-1] = name;
        revs->ignore_packed[num] = NULL;
 }