git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Thomas RastNext: Johannes Sixt
Message 13 of 19 in “Providing mechanism to list available repositories”
  1. 0/4 Providing mechanism to list available repositoriesGreg Brockman, Jul 14, 2010
  2. 1/4 Allow creation of arbitrary git-shell commandsGreg Brockman, Jul 14, 2010
  3. Junio C HamanoJul 14, 2010
  4. Greg BrockmanJul 14, 2010
  5. 2/4 git-shell-commands: Add a command to list bare reposGreg Brockman, Jul 14, 2010
  6. 3/4 git-shell-commands: Add a help commandGreg Brockman, Jul 14, 2010
  7. 4/4 Add interactive mode to git-shell for user-friendlinessGreg Brockman, Jul 14, 2010
  8. Ævar Arnfjörð BjarmasonJul 14, 2010
  9. Kevin P. FlemingJul 14, 2010
  10. Bernhard R. LinkJul 14, 2010
  11. Thomas RastJul 14, 2010
  12. Cast execl*() NULL sentinels to (char *)Thomas Rast, Jul 24, 2010
  13. Ævar Arnfjörð BjarmasonJul 24, 2010
  14. Johannes SixtJul 14, 2010
  15. Junio C HamanoJul 14, 2010
  16. Greg BrockmanJul 14, 2010
  17. Greg BrockmanJul 17, 2010
  18. Jonathan NiederJul 17, 2010
  19. Greg BrockmanJul 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.