[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [patch] use socklen_t with getsockopt()
From: |
Mike Frysinger |
Subject: |
[Qemu-devel] [patch] use socklen_t with getsockopt() |
Date: |
Sat, 23 Jun 2007 14:27:24 -0400 |
User-agent: |
KMail/1.9.7 |
obvious fixup ... getsockopt() takes a socklen_t, not an int
-mike
signature.asc
Description: This is a digitally signed message part.
--- linux-user/syscall.c
+++ linux-user/syscall.c
@@ -642,7 +642,8 @@ static long do_setsockopt(int sockfd, in
static long do_getsockopt(int sockfd, int level, int optname,
target_ulong optval, target_ulong optlen)
{
- int len, lv, val, ret;
+ int len, val, ret;
+ socklen_t lv;
switch(level) {
case TARGET_SOL_SOCKET:
@@ -665,7 +666,7 @@ static long do_getsockopt(int sockfd, in
len = tget32(optlen);
if (len < 0)
return -EINVAL;
- lv = sizeof(int);
+ lv = sizeof(val);
ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv));
if (ret < 0)
return ret;
@@ -698,7 +699,7 @@ static long do_getsockopt(int sockfd, in
len = tget32(optlen);
if (len < 0)
return -EINVAL;
- lv = sizeof(int);
+ lv = sizeof(val);
ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv));
if (ret < 0)
return ret;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [patch] use socklen_t with getsockopt(),
Mike Frysinger <=