]> git.proxmox.com Git - mirror_qemu.git/commit - block/blkdebug.c
qstring: Move qstring_from_substr()'s @end one to the right
authorMarkus Armbruster <armbru@redhat.com>
Fri, 27 Jul 2018 06:22:04 +0000 (08:22 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 28 Jul 2018 07:09:58 +0000 (09:09 +0200)
commitba891d68b4ff17faaea3d3a8bfd82af3eed0a134
treea60591188270f2ec5ade8eef780b26da5ddf0efd
parentb65ab77b3afadd7bb3051b341a5258ff7fb9d246
qstring: Move qstring_from_substr()'s @end one to the right

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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180727062204.10401-3-armbru@redhat.com>
block/blkdebug.c
block/blkverify.c
block/nbd.c
qobject/qstring.c
tests/check-qobject.c
tests/check-qstring.c