<div dir="ltr"><div>From: Yicheng Qin <<a href="mailto:yichengq@google.com">yichengq@google.com</a>></div><div>Subject: [PATCH] test/zdtm/cwd00: remove redundant chdir()</div><div><br></div><div>Label 'out' and chdir() below it are just redundant. Remove them</div>
<div>to make test simple.</div><div><br></div><div>Signed-off-by: Yicheng Qin <<a href="mailto:yichengq@google.com">yichengq@google.com</a>></div><div>---</div><div> test/zdtm/live/static/cwd00.c | 6 ++----</div><div>
1 file changed, 2 insertions(+), 4 deletions(-)</div><div><br></div><div>diff --git a/test/zdtm/live/static/cwd00.c b/test/zdtm/live/static/cwd00.c</div><div>index abdd3d9..49ed2e3 100644</div><div>--- a/test/zdtm/live/static/cwd00.c</div>
<div>+++ b/test/zdtm/live/static/cwd00.c</div><div>@@ -43,17 +43,15 @@ int main(int argc, char **argv)</div><div> </div><div> if (!getcwd(cwd2, sizeof(cwd2))) {</div><div> fail("can't get cwd: %m\n");</div>
<div>- goto out;</div><div>+ goto cleanup;</div><div> }</div><div> </div><div> if (strcmp(cwd1, cwd2))</div><div> fail("%s != %s\n", cwd1, cwd2);</div><div>
else</div><div> pass();</div><div>-out:</div><div>- chdir(cwd0); /* return to the initial dir before writing out results */</div><div> cleanup:</div><div>- chdir(cwd0);</div><div>+ chdir(cwd0); /* return to the initial dir before writing out results */</div>
<div> rmdir(dirname);</div><div> return 0;</div><div> }</div><div>-- </div><div>1.8.3</div><div><br></div></div>