Merge "Clean up -p handling slightly."
This commit is contained in:
commit
ec035950e6
1 changed files with 2 additions and 2 deletions
|
|
@ -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 */
|
/* this is a special flag used only when the ADB client launches the ADB Server */
|
||||||
is_daemon = 1;
|
is_daemon = 1;
|
||||||
} else if (!strncmp(argv[0], "-p", 2)) {
|
} else if (!strncmp(argv[0], "-p", 2)) {
|
||||||
const char *product = NULL;
|
const char* product = nullptr;
|
||||||
if (argv[0][2] == '\0') {
|
if (argv[0][2] == '\0') {
|
||||||
if (argc < 2) return usage();
|
if (argc < 2) return usage();
|
||||||
product = argv[1];
|
product = argv[1];
|
||||||
|
|
@ -999,7 +999,7 @@ int adb_commandline(int argc, const char **argv) {
|
||||||
} else {
|
} else {
|
||||||
product = argv[0] + 2;
|
product = argv[0] + 2;
|
||||||
}
|
}
|
||||||
if (product) gProductOutPath = find_product_out_path(product);
|
gProductOutPath = find_product_out_path(product);
|
||||||
if (gProductOutPath.empty()) {
|
if (gProductOutPath.empty()) {
|
||||||
fprintf(stderr, "adb: could not resolve \"-p %s\"\n", product);
|
fprintf(stderr, "adb: could not resolve \"-p %s\"\n", product);
|
||||||
return usage();
|
return usage();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue