projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdddc25
)
testusb: Fix warning comparing pointer to 0
author
Haowen Bai
<baihaowen@meizu.com>
Thu, 24 Mar 2022 02:16:11 +0000
(10:16 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 11:32:49 +0000
(13:32 +0200)
Avoid pointer type value compared with 0 to make code clear.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link:
https://lore.kernel.org/r/1648088171-30912-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/usb/testusb.c
patch
|
blob
|
history
diff --git
a/tools/usb/testusb.c
b/tools/usb/testusb.c
index 69c3ead25313de00f4129c2a24ff7ebd7ee0d0b4..474bae868b353cc2542d9356203fdf816ef58e1f 100644
(file)
--- a/
tools/usb/testusb.c
+++ b/
tools/usb/testusb.c
@@
-482,7
+482,7
@@
usage:
}
if (not)
return 0;
- if (testdevs &&
testdevs->next == 0
&& !device)
+ if (testdevs &&
!testdevs->next
&& !device)
device = testdevs->name;
for (entry = testdevs; entry; entry = entry->next) {
int status;