summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-03-24 10:16:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-26 13:32:49 +0200
commitef94b2664a2504d4091ea202c36fa20649060c3a (patch)
treea30ed68f6413459757a7e4081bf69ce33f2c012d
parentbdddc253b0938a0063798881d1f6a971ea1d8943 (diff)
downloadlinux-ef94b2664a2504d4091ea202c36fa20649060c3a.tar.gz
linux-ef94b2664a2504d4091ea202c36fa20649060c3a.tar.bz2
linux-ef94b2664a2504d4091ea202c36fa20649060c3a.zip
testusb: Fix warning comparing pointer to 0
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>
-rw-r--r--tools/usb/testusb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c
index 69c3ead25313..474bae868b35 100644
--- 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;