Skip to content

Commit

Permalink
run-command documentation: fix "memset()" parameter
Browse files Browse the repository at this point in the history
When initializing the struct async and struct child_process structures,
the documentation suggested "clearing" the structure with '0' instead of
'\0'.  It is enough to use integer zero here.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed Jun 17, 2008
1 parent 5f54de5 commit 9e18522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/technical/api-run-command.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ command to run in a sub-process.

The caller:

1. allocates and clears (memset(&chld, '0', sizeof(chld));) a
1. allocates and clears (memset(&chld, 0, sizeof(chld));) a
struct child_process variable;
2. initializes the members;
3. calls start_command();
Expand Down Expand Up @@ -136,7 +136,7 @@ to produce output that the caller reads.

The caller:

1. allocates and clears (memset(&asy, '0', sizeof(asy));) a
1. allocates and clears (memset(&asy, 0, sizeof(asy));) a
struct async variable;
2. initializes .proc and .data;
3. calls start_async();
Expand Down

0 comments on commit 9e18522

Please sign in to comment.