<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 8, 2020 at 5:48 PM Jan Stancek <<a href="mailto:jstancek@redhat.com">jstancek@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small">...</span><br>
<br>
But there would be clear connection between function and variable.<br>
  new_path = tst_cgroup_get_path(cgroup_dir);<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small"><span class="gmail_default"></span>Yes, that's easier to understand the code workflow. <span class="gmail_default"></span></div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
vs.<br>
  tst_cgroup_get_path(cgroup_dir);<br>
  // fyi, tst_cgroup_new_path is updated as side-effect of call above<br>
  // What other calls do update tst_cgroup_new_path? Have a look at implementation. </blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail_default" style="font-size:small">...</span><br>
<br>
That makes it somewhat better, since it's only concern of library code now.<br>
But since there are no tests using "tst_cgroup_new_path", does it still<br>
need to be global variable?<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Sure, we could delete tst_cgorup_mnt/new_path variables, since we have</div><div class="gmail_default" style="font-size:small">tracking all mount paths in the list, so it will be easy to find new_path in each</div><div class="gmail_default" style="font-size:small">function.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Hope v4 is the final version:).</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>