Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-11-16' into staging

nbd patches for 2020-11-16

- silence Coverity false positive
- modernize iotests python code related to nbd

# gpg: Signature made Mon 16 Nov 2020 20:58:13 GMT
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full]
# gpg:                 aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2020-11-16:
  iotests: Replace deprecated ConfigParser.readfp()
  nbd: Silence Coverity false positive

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2020-11-17 11:07:00 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -2129,8 +2129,8 @@ static void bitmap_to_extents(BdrvDirtyBitmap *bitmap,
} }
if (!full) { if (!full) {
/* last non dirty extent */ /* last non dirty extent, nothing to do if array is now full */
nbd_extent_array_add(es, end - start, 0); (void) nbd_extent_array_add(es, end - start, 0);
} }
bdrv_dirty_bitmap_unlock(bitmap); bdrv_dirty_bitmap_unlock(bitmap);

View File

@ -227,7 +227,7 @@ def parse_config(config):
def load_rules(filename): def load_rules(filename):
config = configparser.RawConfigParser() config = configparser.RawConfigParser()
with open(filename, 'rt') as f: with open(filename, 'rt') as f:
config.readfp(f, filename) config.read_file(f, filename)
return parse_config(config) return parse_config(config)
def open_socket(path): def open_socket(path):