summaryrefslogtreecommitdiff
path: root/common/usb_pd_console_cmd.c
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2022-08-30 00:03:12 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-01 22:41:45 +0000
commit2e864b253903b8fbcfa509113be2407e76daea2e (patch)
treee383593749ba7d726dcdb45e30c2098a47bb4a05 /common/usb_pd_console_cmd.c
parent76789c78aff4a73c2dc0aca526267714fffb075b (diff)
downloadchrome-ec-2e864b253903b8fbcfa509113be2407e76daea2e.tar.gz
tree-wide: const-ify argv for console commands
This updates the API for console commands from "int cmd(int argc, char **argv)" to "int cmd(int argc, const char **argv)" which is more accurate and in line with common convention. BRANCH=none BUG=b:244387210 TEST="make buildall" passes TEST="zmake build -a" passes TEST="util/compare_build.sh -b all" passes TEST="./twister -v -T zephyr/test" passes Cq-Depend: chrome-internal:4960125 Cq-Depend: chrome-internal:4959932 Change-Id: I57de9f35b85b8f3c7119df36aefb2abf25d2625f Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863941 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/usb_pd_console_cmd.c')
-rw-r--r--common/usb_pd_console_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_console_cmd.c b/common/usb_pd_console_cmd.c
index a04ef785f9..96ae17b731 100644
--- a/common/usb_pd_console_cmd.c
+++ b/common/usb_pd_console_cmd.c
@@ -75,7 +75,7 @@ static void dump_pe(int port)
}
}
-static int command_pe(int argc, char **argv)
+static int command_pe(int argc, const char **argv)
{
int port;
char *e;
@@ -106,7 +106,7 @@ static const char *const cable_curr[] = {
[USB_VBUS_CUR_5A] = "5A",
};
-static int command_cable(int argc, char **argv)
+static int command_cable(int argc, const char **argv)
{
int port;
char *e;