nbd patches for 2020-11-16

- silence Coverity false positive
 - modernize iotests python code related to nbd
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAl+y5+UACgkQp6FrSiUn
 Q2ogVwf9HWFOCv7EmMPRkkCsIozuuNMpAaUcSO1QfmPzztOMa8fSzPtQSdCP9jJc
 8ajJt6IKu99DCt6zpki+mAMx2+dfVDsQX89Nb3p61eETd4Yfi+zBWSzMyh0zBkNb
 D8i8KCDJ3mZPAETqD5QKyLffISzV5Ctj12vsMwk/N9O5HEPtSkSfdpFy4BZO+L2d
 zYp90MCFSvt/JiSvdeLPUxQZFdeFzCO5jZLPF2yzyGFt5/iShbcB11iDEWsIBDUG
 sGqU3PtMLTltQJsmPoYHyNFuI+Ex3unaTn0tcwSBzzsiJS7NMZ+iNdNIdWGh/LT+
 1KFe5CPf45l8QKhHgYeV+d5j6E/qMg==
 =5F1H
 -----END PGP SIGNATURE-----

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
commit 48aa8f0ac5
2 changed files with 3 additions and 3 deletions

View File

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

View File

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