From 048b27c0665faecf72372de2884790ef60dfe1fd Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 31 Jul 2015 13:18:22 -0700 Subject: [PATCH] Clean up -p handling slightly. Change-Id: I8a5cd4a7adb0dde9d09e0cbb620874b1bca35e43 --- adb/commandline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adb/commandline.cpp b/adb/commandline.cpp index 5e89f957f..d7a0c8d5b 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp @@ -990,7 +990,7 @@ int adb_commandline(int argc, const char **argv) { /* this is a special flag used only when the ADB client launches the ADB Server */ is_daemon = 1; } else if (!strncmp(argv[0], "-p", 2)) { - const char *product = NULL; + const char* product = nullptr; if (argv[0][2] == '\0') { if (argc < 2) return usage(); product = argv[1]; @@ -999,7 +999,7 @@ int adb_commandline(int argc, const char **argv) { } else { product = argv[0] + 2; } - if (product) gProductOutPath = find_product_out_path(product); + gProductOutPath = find_product_out_path(product); if (gProductOutPath.empty()) { fprintf(stderr, "adb: could not resolve \"-p %s\"\n", product); return usage();