aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-02-07 01:05:49 -0500
committerRiku Voipio <riku.voipio@nokia.com>2011-02-09 10:33:53 +0200
commit73160d952922157f16946e8ebb4419072de4c657 (patch)
treebf1046f98958ce5f475647619eb262c37520dc5f /linux-user
parent8d79de6e42947a4a11ad7c7bb87e8f745a4f8321 (diff)
downloadqemu-73160d952922157f16946e8ebb4419072de4c657.zip
qemu-73160d952922157f16946e8ebb4419072de4c657.tar.gz
qemu-73160d952922157f16946e8ebb4419072de4c657.tar.bz2
linux-user: fix sizeof handling for getsockopt
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 499c4d7..6116ab5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1448,7 +1448,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
return -TARGET_EFAULT;
if (len < 0)
return -TARGET_EINVAL;
- lv = sizeof(int);
+ lv = sizeof(lv);
ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv));
if (ret < 0)
return ret;
@@ -1485,7 +1485,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
return -TARGET_EFAULT;
if (len < 0)
return -TARGET_EINVAL;
- lv = sizeof(int);
+ lv = sizeof(lv);
ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv));
if (ret < 0)
return ret;