mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-02 14:19:05 +00:00
parent
47092cf5a8
commit
757e95dd18
1 changed files with 2 additions and 3 deletions
|
@ -107,7 +107,7 @@ show_adb_err_msg(enum process_result err, const char *const argv[]) {
|
||||||
|
|
||||||
process_t
|
process_t
|
||||||
adb_execute(const char *serial, const char *const adb_cmd[], size_t len) {
|
adb_execute(const char *serial, const char *const adb_cmd[], size_t len) {
|
||||||
const char **cmd = malloc(sizeof(*cmd) * (len + 4));
|
const char *cmd[len + 4];
|
||||||
int i;
|
int i;
|
||||||
process_t process;
|
process_t process;
|
||||||
cmd[0] = get_adb_command();
|
cmd[0] = get_adb_command();
|
||||||
|
@ -124,9 +124,8 @@ adb_execute(const char *serial, const char *const adb_cmd[], size_t len) {
|
||||||
enum process_result r = process_execute(cmd, &process);
|
enum process_result r = process_execute(cmd, &process);
|
||||||
if (r != PROCESS_SUCCESS) {
|
if (r != PROCESS_SUCCESS) {
|
||||||
show_adb_err_msg(r, cmd);
|
show_adb_err_msg(r, cmd);
|
||||||
process = PROCESS_NONE;
|
return PROCESS_NONE;
|
||||||
}
|
}
|
||||||
free(cmd);
|
|
||||||
return process;
|
return process;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue