mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git
synced 2024-11-15 06:53:43 +08:00
lsusb: Squash Wpointer-compare warning.
This squashes "warning: comparison between pointer and zero character" This was an empty string check that was checking the pointer rather than the first character. The check was done correctly before the string was used, so here we yank the correct check up, to the upper level, replacing the ineffectual/broken one. Signed-off-by: Michael Drake <michael.drake@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
977f8f8773
commit
969054759a
@ -64,17 +64,16 @@ static void desc_bmcontrol_dump(
|
||||
(type == DESC_BMCONTROL_2));
|
||||
|
||||
while (strings[count] != NULL) {
|
||||
if (strings[0] != '\0') {
|
||||
if (strings[count][0] != '\0') {
|
||||
if (type == DESC_BMCONTROL_1) {
|
||||
if ((strings[count][0] != '\0') &&
|
||||
(bmcontrols >> count) & 0x1) {
|
||||
if ((bmcontrols >> count) & 0x1) {
|
||||
printf("%*s%s Control\n",
|
||||
indent * 2, "",
|
||||
strings[count]);
|
||||
}
|
||||
} else {
|
||||
control = (bmcontrols >> (count * 2)) & 0x3;
|
||||
if ((strings[count][0] != '\0') && control) {
|
||||
if (control) {
|
||||
printf("%*s%s Control (%s)\n",
|
||||
indent * 2, "",
|
||||
strings[count],
|
||||
|
Loading…
Reference in New Issue
Block a user