summaryrefslogtreecommitdiff
path: root/extra/usb_updater/gsctool.c
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-10-16 15:00:18 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-17 13:02:49 -0700
commite63e0515e46b8799b33a8a034dafef26e3246cc9 (patch)
tree99bfb7f15c2c94d1b171e241388ff2ea2b0d1b6c /extra/usb_updater/gsctool.c
parent465eaf4d7ec68bd19b6f1ab9d7e50bb0ed2f0c9e (diff)
downloadchrome-ec-e63e0515e46b8799b33a8a034dafef26e3246cc9.tar.gz
gsctool: harden the APIs marking pointers const
This is just a tweak marking pointers to the vendor command payloads as const, as the command payloads are not supposed to be modified by the communication layers. BRANCH=none BUG=none TEST=make buildall -j; make -c ./extra/usb_updater Change-Id: I68f15e8c77dc892173ff0241072128d960712a80 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/722114 Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'extra/usb_updater/gsctool.c')
-rw-r--r--extra/usb_updater/gsctool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c
index 6e79be1e3a..4a271c23cb 100644
--- a/extra/usb_updater/gsctool.c
+++ b/extra/usb_updater/gsctool.c
@@ -1139,7 +1139,7 @@ static void setup_connection(struct transfer_descriptor *td)
* if it is - of what maximum size.
*/
static int ext_cmd_over_usb(struct usb_endpoint *uep, uint16_t subcommand,
- void *cmd_body, size_t body_size,
+ const void *cmd_body, size_t body_size,
void *resp, size_t *resp_size)
{
struct update_frame_header *ufh;
@@ -1221,7 +1221,7 @@ static int transfer_image(struct transfer_descriptor *td,
static uint32_t send_vendor_command(struct transfer_descriptor *td,
uint16_t subcommand,
- void *command_body,
+ const void *command_body,
size_t command_body_size,
void *response,
size_t *response_size)