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 <arm...@redhat.com>
---

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 <ebl...@redhat.com>

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

Reply via email to