aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-12-15 10:13:46 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-12-15 10:13:46 +0000
commit48804eebd4a327e4b11f902ba80a00876ee53a43 (patch)
tree67987d8d9d35b3019a3f98805df654bec7f5af8d /tools
parentae2b87341b5ddb0dcb1b3f2d4f586ef18de75873 (diff)
parent6c5aaee4b61eb8bf60c7c30365432710b4346421 (diff)
downloadqemu-48804eebd4a327e4b11f902ba80a00876ee53a43.zip
qemu-48804eebd4a327e4b11f902ba80a00876ee53a43.tar.gz
qemu-48804eebd4a327e4b11f902ba80a00876ee53a43.tar.bz2
Merge tag 'pull-misc-2022-12-14' of https://repo.or.cz/qemu/armbru into staging
Miscellaneous patches for 2022-12-14 # gpg: Signature made Wed 14 Dec 2022 15:23:02 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-misc-2022-12-14' of https://repo.or.cz/qemu/armbru: ppc4xx_sdram: Simplify sdram_ddr_size() to return block/vmdk: Simplify vmdk_co_create() to return directly cleanup: Tweak and re-run return_directly.cocci io: Tidy up fat-fingered parameter name qapi: Use returned bool to check for failure (again) sockets: Use ERRP_GUARD() where obviously appropriate qemu-config: Use ERRP_GUARD() where obviously appropriate qemu-config: Make config_parse_qdict() return bool monitor: Use ERRP_GUARD() in monitor_init() monitor: Simplify monitor_fd_param()'s error handling error: Move ERRP_GUARD() to the beginning of the function error: Drop a few superfluous ERRP_GUARD() error: Drop some obviously superfluous error_propagate() Drop more useless casts from void * to pointer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/fuse_lowlevel.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
index 2f08471..194a1b8 100644
--- a/tools/virtiofsd/fuse_lowlevel.c
+++ b/tools/virtiofsd/fuse_lowlevel.c
@@ -216,7 +216,6 @@ static int send_reply(fuse_req_t req, int error, const void *arg,
int fuse_reply_iov(fuse_req_t req, const struct iovec *iov, int count)
{
- int res;
g_autofree struct iovec *padded_iov = NULL;
padded_iov = g_try_new(struct iovec, count + 1);
@@ -227,9 +226,7 @@ int fuse_reply_iov(fuse_req_t req, const struct iovec *iov, int count)
memcpy(padded_iov + 1, iov, count * sizeof(struct iovec));
count++;
- res = send_reply_iov(req, 0, padded_iov, count);
-
- return res;
+ return send_reply_iov(req, 0, padded_iov, count);
}
@@ -589,7 +586,6 @@ int fuse_reply_ioctl_retry(fuse_req_t req, const struct iovec *in_iov,
g_autofree struct fuse_ioctl_iovec *out_fiov = NULL;
struct iovec iov[4];
size_t count = 1;
- int res;
memset(&arg, 0, sizeof(arg));
arg.flags |= FUSE_IOCTL_RETRY;
@@ -601,15 +597,13 @@ int fuse_reply_ioctl_retry(fuse_req_t req, const struct iovec *in_iov,
/* Can't handle non-compat 64bit ioctls on 32bit */
if (sizeof(void *) == 4 && req->ioctl_64bit) {
- res = fuse_reply_err(req, EINVAL);
- return res;
+ return fuse_reply_err(req, EINVAL);
}
if (in_count) {
in_fiov = fuse_ioctl_iovec_copy(in_iov, in_count);
if (!in_fiov) {
- res = fuse_reply_err(req, ENOMEM);
- return res;
+ return fuse_reply_err(req, ENOMEM);
}
iov[count].iov_base = (void *)in_fiov;
@@ -619,8 +613,7 @@ int fuse_reply_ioctl_retry(fuse_req_t req, const struct iovec *in_iov,
if (out_count) {
out_fiov = fuse_ioctl_iovec_copy(out_iov, out_count);
if (!out_fiov) {
- res = fuse_reply_err(req, ENOMEM);
- return res;
+ return fuse_reply_err(req, ENOMEM);
}
iov[count].iov_base = (void *)out_fiov;
@@ -628,9 +621,7 @@ int fuse_reply_ioctl_retry(fuse_req_t req, const struct iovec *in_iov,
count++;
}
- res = send_reply_iov(req, 0, iov, count);
-
- return res;
+ return send_reply_iov(req, 0, iov, count);
}
int fuse_reply_ioctl(fuse_req_t req, int result, const void *buf, size_t size)
@@ -659,7 +650,6 @@ int fuse_reply_ioctl_iov(fuse_req_t req, int result, const struct iovec *iov,
{
g_autofree struct iovec *padded_iov = NULL;
struct fuse_ioctl_out arg;
- int res;
padded_iov = g_try_new(struct iovec, count + 2);
if (padded_iov == NULL) {
@@ -673,9 +663,7 @@ int fuse_reply_ioctl_iov(fuse_req_t req, int result, const struct iovec *iov,
memcpy(&padded_iov[2], iov, count * sizeof(struct iovec));
- res = send_reply_iov(req, 0, padded_iov, count + 2);
-
- return res;
+ return send_reply_iov(req, 0, padded_iov, count + 2);
}
int fuse_reply_poll(fuse_req_t req, unsigned revents)