[PATCH 08/11] Unit: avoided needlessly setting lib in nxt_unit_shm_open().

Andrew Clayton andrew at digital-domain.net
Thu Jun 16 18:01:14 UTC 2022


On Thu, 16 Jun 2022 17:57:30 +0200
Alejandro Colomar <alx.manpages at gmail.com> wrote:

> On 6/16/22 03:00, Andrew Clayton wrote:
> > As was pointed out by the cppcheck[0] static code analysis utility, lib
> > was being set in nxt_unit_shm_open() regardless of platform when in fact
> > it's only used when (NXT_HAVE_MEMFD_CREATE || NXT_HAVE_SHM_OPEN).
> > 
> > Move the variable declaration & definition to be within the
> > 
> >    #if (NXT_HAVE_MEMFD_CREATE || NXT_HAVE_SHM_OPEN)
> > 
> > block.
> > 
> > [0]: https://cppcheck.sourceforge.io/  
> 
> Reviewed-by: Alejandro Colomar <alx.manpages at gmail.com>

Thanks!

Cheers,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20220616/68b75813/attachment.bin>


More information about the unit mailing list