On 11/01/2017 10:42 AM, Vladimir Sementsov-Ogievskiy wrote: > Add an assert here to make last length assignment meaningful and > following return without tail dropping obvious.
Not quite sure I followed your explanation, which means it's difficult for me to propose an alternative wording. Maybe: Add an assert here to make it obvious that the prior loop consumed the rest of the input, and that all further code in the function is focused on output. On the other hand, if you are okay with it, I wouldn't mind squashing the first and second patches into one (as the first patch is then easier to read when it is obvious that we used the wrong length variable). But until I get your feedback (on either squashing the two patches or tweaking the wording), I'm just placing your patches as-is on my NBD queue for inclusion prior to rc0. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > nbd/server.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature