Re: [PATCH] Cast execl*() NULL sentinels to (char *)
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jul 24, 2010, 15:27 UTC
- Message-ID
- <AANLkTimxB-n4oq-5XUSK5XwEXLnwLsakyuryNlUnghJr@mail.gmail.com>
- In-Reply-To
- <00564b8ba93617801bb78b4a0ec67784e597d02a.1279983892.git.trast@student.ethz.ch>
On Sat, Jul 24, 2010 at 15:20, Thomas Rast <trast@student.ethz.ch> wrote:
Show 10 quoted lines
> 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>
Nice that you got around to this after I inadvertently pointed it out in another thread.
Acked.