aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-11-17 11:07:00 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-11-17 11:07:00 +0000
commit48aa8f0ac536db3550a35c295ff7de94e4c33739 (patch)
tree3eaa72331ba0dc29e21094b2a7011676bb45f283
parentbce36c6c5436c0c2679b42c6de54de5393dfcf59 (diff)
parent2f3c1fd39668b9e565a4e0ba1d62ff5db05d62a5 (diff)
downloadqemu-48aa8f0ac536db3550a35c295ff7de94e4c33739.zip
qemu-48aa8f0ac536db3550a35c295ff7de94e4c33739.tar.gz
qemu-48aa8f0ac536db3550a35c295ff7de94e4c33739.tar.bz2
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>
-rw-r--r--nbd/server.c4
-rwxr-xr-xtests/qemu-iotests/nbd-fault-injector.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/nbd/server.c b/nbd/server.c
index d145e1a..613ed26 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -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);
diff --git a/tests/qemu-iotests/nbd-fault-injector.py b/tests/qemu-iotests/nbd-fault-injector.py
index 78f42c4..6e11ef8 100755
--- a/tests/qemu-iotests/nbd-fault-injector.py
+++ b/tests/qemu-iotests/nbd-fault-injector.py
@@ -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):