Skip to content

Commit

Permalink
revision.c: use proper data type in call to sizeof() within xrealloc
Browse files Browse the repository at this point in the history
A type char** was being used instead of char*.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Nov 15, 2008
1 parent e9854a7 commit d0f19d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d0f19d0

Please sign in to comment.