qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] qstring: Move qstring_from_substr()'s @end


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2] qstring: Move qstring_from_substr()'s @end one to the right
Date: Thu, 26 Jul 2018 09:07:28 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/26/2018 01:18 AM, Markus Armbruster wrote:
qstring_from_substr() takes the index of the substring's first and
last character.  qstring_from_substr(s, 0, SIZE_MAX) denotes an empty
substring.  Awkward.

Shift the end index one to the right.  This simplifies both
qstring_from_substr() and its callers.

Signed-off-by: Markus Armbruster <address@hidden>
---

Not strictly a bug fix, but found while fixing a bug, thus I'm okay if this makes it into 3.0 (your call as maintainer).

  block/blkdebug.c      | 2 +-
  block/blkverify.c     | 2 +-
  block/nbd.c           | 2 +-
  qobject/qstring.c     | 6 +++---
  tests/check-qobject.c | 2 +-
  tests/check-qstring.c | 2 +-
  6 files changed, 8 insertions(+), 8 deletions(-)


This does fix all users.

Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]