<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 Wed, Aug 30, 2023 at 3:17 PM Peter Krempa <<a href="mailto:pkrempa@redhat.com">pkrempa@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">The 'buf', 'sa' and 'hints' stack allocated helper variables are never<br>
used together. Decrease the stack memory usage by scoping them off into<br>
do-while blocks.<br>
<br>
In this instance we do not want to use dynamic allocation as this is the<br>
NSS module.<br>
<br>
Signed-off-by: Peter Krempa <<a href="mailto:pkrempa@redhat.com" target="_blank">pkrempa@redhat.com</a>><br>
---<br>
<br>
v2: Moved two error checks containing a 'continue' out of the 'do-while'<br>
loop blocks<br>
<br>
New pipeline:<br>
<a href="https://gitlab.com/pipo.sk/libvirt/-/pipelines/986529301" rel="noreferrer" target="_blank">https://gitlab.com/pipo.sk/libvirt/-/pipelines/986529301</a><br>
<br>
<br>
tools/nss/libvirt_nss.c | 87 ++++++++++++++++++++++++-----------------<br>
1 file changed, 51 insertions(+), 36 deletions(-)<br></blockquote><div><br></div><div><div style="font-size:small" class="gmail_default"><div>Reviewed-by: Kristina Hanicova <<a href="mailto:khanicov@redhat.com" target="_blank">khanicov@redhat.com</a>> <br></div><font color="#888888" style="--darkreader-inline-color: #b2a696;"><font color="#888888" style="--darkreader-inline-color: #b2a696;"><div><br></div><div><div class="gmail_default"><font size="2">Kristina</font></div></div></font></font></div><br></div></div></div>