author | Thomas Rast <trast@student.ethz.ch> | |
Sat, 24 Jul 2010 15:20:23 +0000 (17:20 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 26 Jul 2010 06:14:18 +0000 (23:14 -0700) | ||
commit | 5d314759d787885c2cc389efbfb3aea1c47b56d9 | |
tree | a9b59f44086605bb44bb24f7ce2f90f61d1592f3 | tree | snapshot |
parent | cdad3c54f1020b0b1c0d2d907748f77a60b41a28 | commit | diff |
Cast execl*() NULL sentinels to (char *)
The NULL sentinel argument to the execl*() family of calls must be
cast to (char *), as otherwise:
- platforms where NULL is just 0 (not (void *)) would pass an int
- (admittedly esoteric) platforms where NULL is (void *)0 and (void *)
and (char *) have different memory layouts would pass the wrong kind
of pointer
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The NULL sentinel argument to the execl*() family of calls must be
cast to (char *), as otherwise:
- platforms where NULL is just 0 (not (void *)) would pass an int
- (admittedly esoteric) platforms where NULL is (void *)0 and (void *)
and (char *) have different memory layouts would pass the wrong kind
of pointer
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c | diff | blob | history |