Skip to content

Commit 9e18522

Browse files
Miklos Vajnagitster
authored andcommitted
run-command documentation: fix "memset()" parameter
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5f54de5 commit 9e18522

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/technical/api-run-command.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ command to run in a sub-process.
6363

6464
The caller:
6565

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

137137
The caller:
138138

139-
1. allocates and clears (memset(&asy, '0', sizeof(asy));) a
139+
1. allocates and clears (memset(&asy, 0, sizeof(asy));) a
140140
struct async variable;
141141
2. initializes .proc and .data;
142142
3. calls start_async();

0 commit comments

Comments
 (0)