diff options
author | Stephen Hines <srhines@google.com> | 2014-11-26 01:06:01 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-11-26 14:30:01 -0800 |
commit | 60f21a7f61479fd5215ee8ec8b63ac438be3e5d7 (patch) | |
tree | 40ab0d4d7ea68145c42dcd6995f456d7476e215b /fastboot | |
parent | 606bb5f2e5f2913d5cb30ed87dd18da23dda1705 (diff) | |
download | system_core-60f21a7f61479fd5215ee8ec8b63ac438be3e5d7.zip system_core-60f21a7f61479fd5215ee8ec8b63ac438be3e5d7.tar.gz system_core-60f21a7f61479fd5215ee8ec8b63ac438be3e5d7.tar.bz2 |
Fix incorrect path name check.
This was caught by clang 3.6's -Wpointer-bool-conversion. The device_path
field is a char[256], and thus never NULL. The intention for this code was
to check whether or not there is a named path at all. Checking whether this
is an empty string matches the original intent.
Change-Id: I5ccedc03167e6a457e472089de26130aff7f96e3
Diffstat (limited to 'fastboot')
-rw-r--r-- | fastboot/fastboot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fastboot/fastboot.c b/fastboot/fastboot.c index 43d05aa..ddd3aa5 100644 --- a/fastboot/fastboot.c +++ b/fastboot/fastboot.c @@ -244,7 +244,7 @@ int list_devices_callback(usb_ifc_info *info) // output compatible with "adb devices" if (!long_listing) { printf("%s\tfastboot\n", serial); - } else if (!info->device_path) { + } else if (!strcmp("", info->device_path)) { printf("%-22s fastboot\n", serial); } else { printf("%-22s fastboot %s\n", serial, info->device_path); |