[PATCH 11/11] Unit: removed a useless assignment.
Andrew Clayton
andrew at digital-domain.net
Thu Jun 16 18:24:49 UTC 2022
On Thu, 16 Jun 2022 18:05:36 +0200
Alejandro Colomar <alx.manpages at gmail.com> wrote:
> On 6/16/22 03:01, Andrew Clayton wrote:
> > As was pointed out by the cppcheck[0] static code analysis utility there
> > was a useless assignment in nxt_unit_request_read(). The size parameter
> > is passed in by value and was being modified without being used again.
> >
> > [0]: https://cppcheck.sourceforge.io/
>
> Makes sense:
>
> $ grepc -tfd nxt_unit_request_read
> ./src/nxt_unit.c:3054:
> ssize_t
> nxt_unit_request_read(nxt_unit_request_info_t *req, void *dst, size_t size)
> {
> ssize_t buf_res, res;
>
> ...
> size -= res;
>
> dst = nxt_pointer_to(dst, res);
>
> } else {
> res = 0;
> }
>
> return buf_res + res;
> }
>
>
> 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/f4b19493/attachment.bin>
More information about the unit
mailing list