summaryrefslogtreecommitdiff
path: root/extra/usb_console
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-11-10 17:10:57 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-11 18:37:36 +0000
commite2dfdb09d970143b521a9c6f316ebe09159988ed (patch)
tree02fc659853834812b28387060aed74e0ad722bdb /extra/usb_console
parent737d4205a62c4b70ad33a6fbd547f5cb3f2b888c (diff)
downloadchrome-ec-e2dfdb09d970143b521a9c6f316ebe09159988ed.tar.gz
tree: rename strtoul to strtoull since it is 64-bit
A long is 32-bit, but a long long is 64-bit. The function name should be strtoull if it is returning 64 bits of data. BRANCH=none BUG=b:172592963 TEST=builds Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I04c40f9256ed37eb1cf9b6bd1b0ef0320fe49b0c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530874 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'extra/usb_console')
-rw-r--r--extra/usb_console/usb_console.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/extra/usb_console/usb_console.c b/extra/usb_console/usb_console.c
index 7d99bc3082..3599076a23 100644
--- a/extra/usb_console/usb_console.c
+++ b/extra/usb_console/usb_console.c
@@ -279,21 +279,21 @@ int main(int argc, char *argv[])
while ((i = getopt_long(argc, argv, short_opts, long_opts, 0)) != -1) {
switch (i) {
case 'p':
- pid = (uint16_t) strtoul(optarg, &e, 16);
+ pid = (uint16_t) strtoull(optarg, &e, 16);
if (!*optarg || (e && *e)) {
printf("Invalid argument: \"%s\"\n", optarg);
errorcnt++;
}
break;
case 'v':
- vid = (uint16_t) strtoul(optarg, &e, 16);
+ vid = (uint16_t) strtoull(optarg, &e, 16);
if (!*optarg || (e && *e)) {
printf("Invalid argument: \"%s\"\n", optarg);
errorcnt++;
}
break;
case 'e':
- ep_num = (uint8_t) strtoul(optarg, &e, 0);
+ ep_num = (uint8_t) strtoull(optarg, &e, 0);
if (!*optarg || (e && *e)) {
printf("Invalid argument: \"%s\"\n", optarg);
errorcnt++;