diff --git a/app/src/adb.c b/app/src/adb.c index be973c41..44c80be6 100644 --- a/app/src/adb.c +++ b/app/src/adb.c @@ -102,23 +102,23 @@ show_adb_err_msg(enum process_result err, const char *const argv[]) { process_t adb_execute(const char *serial, const char *const adb_cmd[], size_t len) { - const char *cmd[len + 4]; + const char *argv[len + 4]; int i; process_t process; - cmd[0] = get_adb_command(); + argv[0] = get_adb_command(); if (serial) { - cmd[1] = "-s"; - cmd[2] = serial; + argv[1] = "-s"; + argv[2] = serial; i = 3; } else { i = 1; } - memcpy(&cmd[i], adb_cmd, len * sizeof(const char *)); - cmd[len + i] = NULL; - enum process_result r = process_execute(cmd, &process); + memcpy(&argv[i], adb_cmd, len * sizeof(const char *)); + argv[len + i] = NULL; + enum process_result r = process_execute(argv, &process); if (r != PROCESS_SUCCESS) { - show_adb_err_msg(r, cmd); + show_adb_err_msg(r, argv); return PROCESS_NONE; } return process;