intel_extreme, radeon_hd: Use bufferLength instead of B_FILE_NAME_LENGTH.

Thanks korli for the review!
This commit is contained in:
Augustin Cavalier 2018-07-30 22:50:30 -04:00
parent 1587c3c555
commit 5ad9670f39
2 changed files with 4 additions and 4 deletions

View File

@ -188,7 +188,7 @@ device_ioctl(void* data, uint32 op, void* buffer, size_t bufferLength)
case B_GET_ACCELERANT_SIGNATURE:
TRACE("accelerant: %s\n", INTEL_ACCELERANT_NAME);
if (user_strlcpy((char*)buffer, INTEL_ACCELERANT_NAME,
B_FILE_NAME_LENGTH) < B_OK)
bufferLength) < B_OK)
return B_BAD_ADDRESS;
return B_OK;
@ -210,7 +210,7 @@ device_ioctl(void* data, uint32 op, void* buffer, size_t bufferLength)
// needed for cloning
case INTEL_GET_DEVICE_NAME:
if (user_strlcpy((char* )buffer, gDeviceNames[info->id],
B_PATH_NAME_LENGTH) < B_OK)
bufferLength) < B_OK)
return B_BAD_ADDRESS;
return B_OK;

View File

@ -186,7 +186,7 @@ device_ioctl(void* data, uint32 op, void* buffer, size_t bufferLength)
case B_GET_ACCELERANT_SIGNATURE:
TRACE("%s: accelerant: %s\n", __func__, RADEON_ACCELERANT_NAME);
if (user_strlcpy((char*)buffer, RADEON_ACCELERANT_NAME,
B_FILE_NAME_LENGTH) < B_OK)
bufferLength) < B_OK)
return B_BAD_ADDRESS;
return B_OK;
@ -208,7 +208,7 @@ device_ioctl(void* data, uint32 op, void* buffer, size_t bufferLength)
// needed for cloning
case RADEON_GET_DEVICE_NAME:
if (user_strlcpy((char*)buffer, gDeviceNames[info->id],
B_PATH_NAME_LENGTH) < B_OK)
bufferLength) < B_OK)
return B_BAD_ADDRESS;
return B_OK;