On 11/11/20 8:35 AM, Eric Blake wrote:
> -    if (!full) {
> -        /* last non dirty extent */
> -        nbd_extent_array_add(es, end - start, 0);
> +    if (!full && nbd_extent_array_add(es, end - start, 0) < 0) {
> +        /* last non dirty extent, nothing to do if array was already full */
>      }

Casting to (void) is another way to get rid of the warning.

I dunno which makes more sense here.  Definitely the comment is helpful.

r~

Reply via email to