Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Haowen Bai and committed by
Greg Kroah-Hartman
ef94b266 bdddc253

+1 -1
+1 -1
tools/usb/testusb.c
··· 482 482 } 483 483 if (not) 484 484 return 0; 485 - if (testdevs && testdevs->next == 0 && !device) 485 + if (testdevs && !testdevs->next && !device) 486 486 device = testdevs->name; 487 487 for (entry = testdevs; entry; entry = entry->next) { 488 488 int status;