summary refs log tree commit diff stats
path: root/scripts/qapi/common.py
diff options
context:
space:
mode:
authorChristian Schoenebeck <qemu_oss@crudebyte.com>2021-08-17 14:38:24 +0200
committerChristian Schoenebeck <qemu_oss@crudebyte.com>2021-09-02 13:26:22 +0200
commit97b1d8fdf6c923203968f44805e25dc92b11a317 (patch)
treeacbce5a9c88e471202570be16eae66421ae07560 /scripts/qapi/common.py
parent59a89510b62ec23dbeab8b02fa4e3526e353d8b6 (diff)
downloadfocaccia-qemu-97b1d8fdf6c923203968f44805e25dc92b11a317.tar.gz
focaccia-qemu-97b1d8fdf6c923203968f44805e25dc92b11a317.zip
hw/9pfs: avoid 'path' copy in v9fs_walk()
The v9fs_walk() function resolves all client submitted path nodes to the
local 'pathes' array. Using a separate string scalar variable 'path'
inside the background worker thread loop and copying that local 'path'
string scalar variable subsequently to the 'pathes' array (at the end of
each loop iteration) is not necessary.

Instead simply resolve each path directly to the 'pathes' array and
don't use the string scalar variable 'path' inside the fs worker thread
loop at all.

The only advantage of the 'path' scalar was that in case of an error
the respective 'pathes' element would not be filled. Right now this is
not an issue as the v9fs_walk() function returns as soon as any error
occurs.

Suggested-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <7dacbecf25b2c9b4a0ce12d689a8a535f09a31e3.1629208359.git.qemu_oss@crudebyte.com>
Diffstat (limited to 'scripts/qapi/common.py')
0 files changed, 0 insertions, 0 deletions