xhci: Fix -Wtautological-pointer-compare
Modify if condition, since:
1) Comparison of array 'current->buffer_log' equal to a null pointer
is always false. Pointed out by clang.
2) XHCI::CreateDescriptor() sets buffer_log[0] to NULL,
when bufferSize <= 0.
Change-Id: I9a632dcf9c41435653b0556ed981d78bab846038
Reviewed-on: https://review.haiku-os.org/638
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
aeeec99e35
commit
f203f99dd5
@@ -1005,7 +1005,7 @@ XHCI::WriteDescriptorChain(xhci_td *descriptor, iovec *vector,
|
||||
size_t bufferOffset = 0;
|
||||
|
||||
while (current != NULL) {
|
||||
if (current->buffer_log == NULL)
|
||||
if (current->buffer_log[0] == NULL)
|
||||
break;
|
||||
|
||||
while (true) {
|
||||
@@ -1060,7 +1060,7 @@ XHCI::ReadDescriptorChain(xhci_td *descriptor, iovec *vector,
|
||||
size_t bufferOffset = 0;
|
||||
|
||||
while (current != NULL) {
|
||||
if (current->buffer_log == NULL)
|
||||
if (current->buffer_log[0] == NULL)
|
||||
break;
|
||||
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user