diff options
author | Christopher Head <chead@zaber.com> | 2019-06-04 10:28:54 -0700 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-06-13 12:39:09 +0100 |
commit | b6fa20875942adad271833ef4dfddc1cfa971857 (patch) | |
tree | 5d6c87e8eb64aef5318678bc2163c1f72dd3f70c | |
parent | 20396e56b75d786c535f5655da862f1addc9e255 (diff) | |
download | riscv-openocd-b6fa20875942adad271833ef4dfddc1cfa971857.zip riscv-openocd-b6fa20875942adad271833ef4dfddc1cfa971857.tar.gz riscv-openocd-b6fa20875942adad271833ef4dfddc1cfa971857.tar.bz2 |
jtag/drivers/jtag_usb_common: fix typo
Change-Id: If1f56fd5d610b993a4ecbc900fac9f90638037c9
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5202
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
-rw-r--r-- | src/jtag/drivers/jtag_usb_common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/jtag/drivers/jtag_usb_common.c b/src/jtag/drivers/jtag_usb_common.c index a0fa058..6337272 100644 --- a/src/jtag/drivers/jtag_usb_common.c +++ b/src/jtag/drivers/jtag_usb_common.c @@ -15,18 +15,18 @@ static char *jtag_usb_location; * ------ * 16 chars */ -#define JTAG_USB_MAX_LOCATION_LENGHT 16 +#define JTAG_USB_MAX_LOCATION_LENGTH 16 void jtag_usb_set_location(const char *location) { - if (strnlen(location, JTAG_USB_MAX_LOCATION_LENGHT) == - JTAG_USB_MAX_LOCATION_LENGHT) + if (strnlen(location, JTAG_USB_MAX_LOCATION_LENGTH) == + JTAG_USB_MAX_LOCATION_LENGTH) LOG_WARNING("usb location string is too long!!\n"); if (jtag_usb_location) free(jtag_usb_location); - jtag_usb_location = strndup(location, JTAG_USB_MAX_LOCATION_LENGHT); + jtag_usb_location = strndup(location, JTAG_USB_MAX_LOCATION_LENGTH); } const char *jtag_usb_get_location(void) @@ -42,8 +42,8 @@ bool jtag_usb_location_equal(uint8_t dev_bus, uint8_t *port_path, bool equal = false; /* strtok need non const char */ - loc = strndup(jtag_usb_get_location(), JTAG_USB_MAX_LOCATION_LENGHT); - string_length = strnlen(loc, JTAG_USB_MAX_LOCATION_LENGHT); + loc = strndup(jtag_usb_get_location(), JTAG_USB_MAX_LOCATION_LENGTH); + string_length = strnlen(loc, JTAG_USB_MAX_LOCATION_LENGTH); ptr = strtok(loc, "-"); if (ptr == NULL) { |