we want the argument's contents, don't use the size of the pointer (this would even be 8 bytes in a 64 bits platform).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20560 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos 2007-04-04 15:59:13 +00:00
parent 183071cab3
commit b7c0eba571
2 changed files with 2 additions and 2 deletions

View File

@ -370,7 +370,7 @@ ipro1000_control(void *cookie, uint32 op, void *arg, size_t len)
case ETHER_SET_LINK_STATE_SEM: case ETHER_SET_LINK_STATE_SEM:
{ {
if (user_memcpy(&device->linkChangeSem, arg, sizeof(sem_id *)) < B_OK) { if (user_memcpy(&device->linkChangeSem, arg, sizeof(sem_id)) < B_OK) {
device->linkChangeSem = -1; device->linkChangeSem = -1;
return B_BAD_ADDRESS; return B_BAD_ADDRESS;
} }

View File

@ -178,7 +178,7 @@ ethernet_up(net_device *_device)
// Set the change notification semaphore; doesn't matter // Set the change notification semaphore; doesn't matter
// if this is supported by the device or not // if this is supported by the device or not
ioctl(device->fd, ETHER_SET_LINK_STATE_SEM, &sLinkChangeSemaphore, ioctl(device->fd, ETHER_SET_LINK_STATE_SEM, &sLinkChangeSemaphore,
sizeof(sem_id *)); sizeof(sem_id));
BenaphoreLocker _(&sListLock); BenaphoreLocker _(&sListLock);