diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-02-07 01:05:49 -0500 |
---|---|---|
committer | Riku Voipio <riku.voipio@nokia.com> | 2011-02-09 10:33:53 +0200 |
commit | 73160d952922157f16946e8ebb4419072de4c657 (patch) | |
tree | bf1046f98958ce5f475647619eb262c37520dc5f /linux-user | |
parent | 8d79de6e42947a4a11ad7c7bb87e8f745a4f8321 (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 499c4d7d62..6116ab5f0c 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; |