From fda32928c1bc02afb2c1068084c228565305ce87 Mon Sep 17 00:00:00 2001 From: Wirtos_new Date: Sat, 19 Jun 2021 18:47:57 +0300 Subject: [PATCH] Rename cmd to argv This is more explicit. PR #2405 Signed-off-by: Romain Vimont --- app/src/adb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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;