Re: [PATCH 7/8 v2] nss: aiforaf: Decrease stack size by scoping off large buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, Aug 30, 2023 at 3:17 PM Peter Krempa <pkrempa@xxxxxxxxxx> wrote:
The 'buf', 'sa' and 'hints' stack allocated helper variables are never
used together. Decrease the stack memory usage by scoping them off into
do-while blocks.

In this instance we do not want to use dynamic allocation as this is the
NSS module.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---

v2: Moved two error checks containing a 'continue' out of the 'do-while'
    loop blocks

New pipeline:
https://gitlab.com/pipo.sk/libvirt/-/pipelines/986529301


 tools/nss/libvirt_nss.c | 87 ++++++++++++++++++++++++-----------------
 1 file changed, 51 insertions(+), 36 deletions(-)

Reviewed-by: Kristina Hanicova <khanicov@xxxxxxxxxx>

Kristina


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux