mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-21 03:55:05 +00:00
remove vla from adb_execute
This commit is contained in:
parent
ffd9f0868b
commit
47092cf5a8
1 changed files with 3 additions and 2 deletions
|
@ -107,7 +107,7 @@ 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 **cmd = malloc(sizeof(*cmd) * (len + 4));
|
||||
int i;
|
||||
process_t process;
|
||||
cmd[0] = get_adb_command();
|
||||
|
@ -124,8 +124,9 @@ adb_execute(const char *serial, const char *const adb_cmd[], size_t len) {
|
|||
enum process_result r = process_execute(cmd, &process);
|
||||
if (r != PROCESS_SUCCESS) {
|
||||
show_adb_err_msg(r, cmd);
|
||||
return PROCESS_NONE;
|
||||
process = PROCESS_NONE;
|
||||
}
|
||||
free(cmd);
|
||||
return process;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue