common/utils/vector.h: Remove stale reference to `size`
commitf7270b9091e5b83f4a2cb5d08b1b21a0adc29c56
authorNir Soffer <nsoffer@redhat.com>
Fri, 3 Mar 2023 07:51:37 +0000 (3 08:51 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Sat, 4 Mar 2023 05:05:16 +0000 (4 06:05 +0100)
tree010765a964745f093fb509bb72d7ad3e636e8617
parent648a7909b69ed9be576e379097da09e9507fb868
common/utils/vector.h: Remove stale reference to `size`

Original commit message:

Update stale comments to use `len` instead of `size`.

Fixes: commit cc0567e9aed7e6b40a44bf8eac0a262ac7314fec
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Porting notes:

(1) Libnbd commit cc0567e9aed7 ("common/utils/vector: Rename `size` to
`len`", 2021-10-31) renamed the "size" field of our vector data structure
to "len", but forgot to update the field name in the comments of
"vector.h".

(2) Libnbd commit cc0567e9aed7 was ported to nbdkit as commit 0b0eece73f04
("common/utils/vector: Rename `size` to `len`", 2021-11-07). The port did
*more* than the original: the port also renamed the field in the comments
of "vector.h", plus it clarified the leading comment on name##_reserve().

(3) Libnbd commit 3d6be922e701 ("common/utils/vector.h: Remove stale
reference to `size`", 2021-11-05) fixed up earlier libnbd commit
cc0567e9aed7 by cleaning up the comments, probably striving for synching
libnbd's "vector.h" with nbdkit's. However, this libnbd fixup introduced a
*new* wrapping difference, relative to nbdkit, to the previously mentioned
comment above name##_reserve().

(4) By porting libnbd commit 3d6be922e701 to nbdkit, we can unify the
wrapping of the name##_reserve() comment.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
(cherry picked from libnbd commit 3d6be922e70153a220c7e5c7ae2425d1ff7197f8)
Message-Id: <20230303075145.177338-2-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
Acked-by: Eric Blake <eblake@redhat.com>
common/utils/vector.h