fix misspelled names in locally scoped code

These misspelled words are used in strictly local scopes.
Renaming these variables should not cause any problems.
This commit is contained in:
Lars Kruse 2025-05-02 11:31:19 +02:00 committed by Xiang Xiao
parent ce99762b36
commit 4568110d63
30 changed files with 184 additions and 184 deletions

View file

@ -639,19 +639,19 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
size = size * 2; size = size * 2;
} }
int transfered = 0; int transferred = 0;
while (transfered < size) while (transferred < size)
{ {
int ret = mx8mp_spi_transfer(priv, int ret = mx8mp_spi_transfer(priv,
(const uint8_t *)txbuffer + transfered, (const uint8_t *)txbuffer + transferred,
(uint8_t *)rxbuffer + transfered, (uint8_t *)rxbuffer + transferred,
size - transfered); size - transferred);
if (ret < 0) if (ret < 0)
{ {
break; break;
} }
transfered += ret; transferred += ret;
} }
} }

View file

@ -594,7 +594,7 @@ static int sam_process(struct sam_1wire_s *priv,
const struct sam_1wire_msg_s *msgs, int count) const struct sam_1wire_msg_s *msgs, int count)
{ {
irqstate_t irqs; irqstate_t irqs;
uint8_t indx; uint8_t index;
int ret; int ret;
/* Lock out other clients */ /* Lock out other clients */
@ -607,9 +607,9 @@ static int sam_process(struct sam_1wire_s *priv,
priv->result = ERROR; priv->result = ERROR;
for (indx = 0; indx < count; indx++) for (index = 0; index < count; index++)
{ {
switch (msgs[indx].task) switch (msgs[index].task)
{ {
case ONEWIRETASK_NONE: case ONEWIRETASK_NONE:
priv->result = OK; priv->result = OK;
@ -624,7 +624,7 @@ static int sam_process(struct sam_1wire_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
sam_send(priv, RESET_TX); sam_send(priv, RESET_TX);
leave_critical_section(irqs); leave_critical_section(irqs);
@ -643,7 +643,7 @@ static int sam_process(struct sam_1wire_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
priv->byte = priv->msgs->buffer; priv->byte = priv->msgs->buffer;
priv->bit = 0; priv->bit = 0;
sam_send(priv, (*priv->byte & (1 << priv->bit)) ? sam_send(priv, (*priv->byte & (1 << priv->bit)) ?
@ -665,7 +665,7 @@ static int sam_process(struct sam_1wire_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
priv->byte = priv->msgs->buffer; priv->byte = priv->msgs->buffer;
priv->bit = 0; priv->bit = 0;
sam_send(priv, READ_TX); sam_send(priv, READ_TX);

View file

@ -729,7 +729,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
int count) int count)
{ {
irqstate_t irqs; irqstate_t irqs;
int indx; int index;
int ret; int ret;
/* Lock out other clients */ /* Lock out other clients */
@ -742,9 +742,9 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
priv->result = ERROR; priv->result = ERROR;
for (indx = 0; indx < count; indx++) for (index = 0; index < count; index++)
{ {
switch (msgs[indx].task) switch (msgs[index].task)
{ {
case ONEWIRETASK_NONE: case ONEWIRETASK_NONE:
priv->result = OK; priv->result = OK;
@ -760,7 +760,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
stm32_1wire_send(priv, RESET_TX); stm32_1wire_send(priv, RESET_TX);
leave_critical_section(irqs); leave_critical_section(irqs);
@ -780,7 +780,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
priv->byte = priv->msgs->buffer; priv->byte = priv->msgs->buffer;
priv->bit = 0; priv->bit = 0;
stm32_1wire_send(priv, (*priv->byte & (1 << priv->bit)) ? stm32_1wire_send(priv, (*priv->byte & (1 << priv->bit)) ?
@ -803,7 +803,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
priv->byte = priv->msgs->buffer; priv->byte = priv->msgs->buffer;
priv->bit = 0; priv->bit = 0;
stm32_1wire_send(priv, READ_TX); stm32_1wire_send(priv, READ_TX);

View file

@ -643,7 +643,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
int count) int count)
{ {
irqstate_t irqs; irqstate_t irqs;
int indx; int index;
int ret; int ret;
/* Lock out other clients */ /* Lock out other clients */
@ -656,9 +656,9 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
priv->result = ERROR; priv->result = ERROR;
for (indx = 0; indx < count; indx++) for (index = 0; index < count; index++)
{ {
switch (msgs[indx].task) switch (msgs[index].task)
{ {
case ONEWIRETASK_NONE: case ONEWIRETASK_NONE:
priv->result = OK; priv->result = OK;
@ -674,7 +674,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
stm32_1wire_send(priv, RESET_TX); stm32_1wire_send(priv, RESET_TX);
leave_critical_section(irqs); leave_critical_section(irqs);
@ -694,7 +694,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
priv->byte = priv->msgs->buffer; priv->byte = priv->msgs->buffer;
priv->bit = 0; priv->bit = 0;
stm32_1wire_send(priv, (*priv->byte & (1 << priv->bit)) ? stm32_1wire_send(priv, (*priv->byte & (1 << priv->bit)) ?
@ -717,7 +717,7 @@ static int stm32_1wire_process(struct stm32_1wire_priv_s *priv,
/* Atomic */ /* Atomic */
irqs = enter_critical_section(); irqs = enter_critical_section();
priv->msgs = &msgs[indx]; priv->msgs = &msgs[index];
priv->byte = priv->msgs->buffer; priv->byte = priv->msgs->buffer;
priv->bit = 0; priv->bit = 0;
stm32_1wire_send(priv, READ_TX); stm32_1wire_send(priv, READ_TX);

View file

@ -1172,14 +1172,14 @@ static void adc_shutdown(struct adc_dev_s *dev)
* *
****************************************************************************/ ****************************************************************************/
int tlsr82_adc_init(const char *devpath, int miror) int tlsr82_adc_init(const char *devpath, int minor)
{ {
int ret = OK; int ret = OK;
struct adc_dev_s *dev; struct adc_dev_s *dev;
ainfo("ADC channel: %" PRIu8 "\n", miror); ainfo("ADC channel: %" PRIu8 "\n", minor);
switch (miror) switch (minor)
{ {
#ifdef CONFIG_TLSR82_ADC_CHAN0 #ifdef CONFIG_TLSR82_ADC_CHAN0
case ADC_CHAN_0: case ADC_CHAN_0:

View file

@ -62,6 +62,6 @@
* Name: tlsr82_adc_init * Name: tlsr82_adc_init
****************************************************************************/ ****************************************************************************/
int tlsr82_adc_init(const char *devpath, int miror); int tlsr82_adc_init(const char *devpath, int minor);
#endif /* __ARCH_ARM_SRC_TLSR82_TLSR82_ADC_H */ #endif /* __ARCH_ARM_SRC_TLSR82_TLSR82_ADC_H */

View file

@ -767,7 +767,7 @@ static int pwm_ioctl(struct pwm_lowerhalf_s *dev, int cmd,
* *
****************************************************************************/ ****************************************************************************/
int tlsr82_pwminitialize(const char *devpath, int miror) int tlsr82_pwminitialize(const char *devpath, int minor)
{ {
struct tlsr82_pwmtimer_s *lower; struct tlsr82_pwmtimer_s *lower;
int ret = OK; int ret = OK;
@ -798,9 +798,9 @@ int tlsr82_pwminitialize(const char *devpath, int miror)
up_enable_irq(NR_SW_PWM_IRQ); up_enable_irq(NR_SW_PWM_IRQ);
} }
pwminfo("PWM%u\n", miror); pwminfo("PWM%u\n", minor);
switch (miror) switch (minor)
{ {
#ifdef CONFIG_TLSR82_PWM0 #ifdef CONFIG_TLSR82_PWM0
case 0: case 0:

View file

@ -75,7 +75,7 @@ extern "C"
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
int tlsr82_pwminitialize(const char *devpath, int miror); int tlsr82_pwminitialize(const char *devpath, int minor);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)

View file

@ -361,7 +361,7 @@ int himem_chardev_register(char *name, size_t size)
int himem_chardev_unregister(char *name) int himem_chardev_unregister(char *name)
{ {
int ret = 0; int ret = 0;
int successed = 0; int success = 0;
struct himem_chardev_s *dev; struct himem_chardev_s *dev;
struct himem_chardev_s *tmp; struct himem_chardev_s *tmp;
nxmutex_lock(&lock); nxmutex_lock(&lock);
@ -379,7 +379,7 @@ int himem_chardev_unregister(char *name)
if (ret != 0) if (ret != 0)
{ {
merr("Failed to unmap himem.\n"); merr("Failed to unmap himem.\n");
successed = -1; success = -1;
} }
g_ram_offset = HIMEM_UNMAPPED; g_ram_offset = HIMEM_UNMAPPED;
@ -390,20 +390,20 @@ int himem_chardev_unregister(char *name)
if (ret != 0) if (ret != 0)
{ {
merr("Failed to free himem.\n"); merr("Failed to free himem.\n");
successed = -1; success = -1;
} }
ret = unregister_driver(dev->name); ret = unregister_driver(dev->name);
if (ret != 0) if (ret != 0)
{ {
merr("Failed to unregister driver. dev=%s\n", dev->name); merr("Failed to unregister driver. dev=%s\n", dev->name);
successed = -1; success = -1;
} }
list_delete(&dev->node); list_delete(&dev->node);
kmm_free(dev); kmm_free(dev);
nxmutex_unlock(&lock); nxmutex_unlock(&lock);
return successed; return success;
} }
} }

View file

@ -95,7 +95,7 @@ typedef enum altmdm_state_e
ALTMDM_STATE_SETSUSTIMER, /* Start TX suspend timer state */ ALTMDM_STATE_SETSUSTIMER, /* Start TX suspend timer state */
ALTMDM_STATE_SETSUSTIMERSLEEP, /* Start TX suspend timer when sleep ALTMDM_STATE_SETSUSTIMERSLEEP, /* Start TX suspend timer when sleep
* state */ * state */
ALTMDM_STATE_DESTORY, /* State to be destroyed */ ALTMDM_STATE_DESTROY, /* State to be destroyed */
} altmdm_state_t; } altmdm_state_t;
typedef enum version_phase_e typedef enum version_phase_e
@ -261,7 +261,7 @@ static const struct state_func_s g_state_func[] =
TABLE_CONTENT(DELAYNEXT, common, delaynext, delaynext), TABLE_CONTENT(DELAYNEXT, common, delaynext, delaynext),
TABLE_CONTENT(SETSUSTIMER, common, common, setsustimer), TABLE_CONTENT(SETSUSTIMER, common, common, setsustimer),
TABLE_CONTENT(SETSUSTIMERSLEEP, common, common, setsustimersleep), TABLE_CONTENT(SETSUSTIMERSLEEP, common, common, setsustimersleep),
TABLE_CONTENT(DESTORY, destroy, common, common), TABLE_CONTENT(DESTROY, destroy, common, common),
}; };
static struct altmdm_dev_s g_altmdm_dev; static struct altmdm_dev_s g_altmdm_dev;
@ -483,7 +483,7 @@ static altmdm_state_t process_state_poweroff(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & (EVENT_POWERON | EVENT_SUSPEND | EVENT_RESUME)) else if (event & (EVENT_POWERON | EVENT_SUSPEND | EVENT_RESUME))
{ {
@ -546,7 +546,7 @@ static altmdm_state_t process_state_sleep(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -610,7 +610,7 @@ static altmdm_state_t process_state_sleepwotx(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -685,7 +685,7 @@ static altmdm_state_t process_state_idle4rst(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -746,7 +746,7 @@ static altmdm_state_t process_state_idlewto(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -814,7 +814,7 @@ static altmdm_state_t process_state_idlewoto(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -874,7 +874,7 @@ static altmdm_state_t process_state_idlewotx(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -1026,7 +1026,7 @@ static altmdm_state_t process_state_hdrsreq(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -1133,7 +1133,7 @@ static altmdm_state_t process_state_bodysreq(uint32_t event,
if (event & EVENT_DESTROY) if (event & EVENT_DESTROY)
{ {
altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY); altmdm_event_clear(&g_altmdm_dev.event, EVENT_DESTROY);
state = ALTMDM_STATE_DESTORY; state = ALTMDM_STATE_DESTROY;
} }
else if (event & EVENT_POWEROFF) else if (event & EVENT_POWEROFF)
{ {
@ -1481,7 +1481,7 @@ static altmdm_state_t process_state_setsustimersleep(uint32_t event,
} }
/**************************************************************************** /****************************************************************************
* DESTORY state * DESTROY state
****************************************************************************/ ****************************************************************************/
static int next_state_destroy(altmdm_state_t state) static int next_state_destroy(altmdm_state_t state)
@ -1589,7 +1589,7 @@ int altmdm_poweron(void)
/* Is in POWERON state? */ /* Is in POWERON state? */
if ((g_altmdm_dev.current_state != ALTMDM_STATE_POWEROFF) && if ((g_altmdm_dev.current_state != ALTMDM_STATE_POWEROFF) &&
(g_altmdm_dev.current_state != ALTMDM_STATE_DESTORY)) (g_altmdm_dev.current_state != ALTMDM_STATE_DESTROY))
{ {
if (!(evt & EVENT_POWEROFF)) if (!(evt & EVENT_POWEROFF))
{ {
@ -1633,7 +1633,7 @@ int altmdm_poweroff(void)
/* Is in POWEROFF state? */ /* Is in POWEROFF state? */
if ((g_altmdm_dev.current_state == ALTMDM_STATE_POWEROFF) || if ((g_altmdm_dev.current_state == ALTMDM_STATE_POWEROFF) ||
(g_altmdm_dev.current_state == ALTMDM_STATE_DESTORY)) (g_altmdm_dev.current_state == ALTMDM_STATE_DESTROY))
{ {
if (!(evt & EVENT_POWERON)) if (!(evt & EVENT_POWERON))
{ {

View file

@ -683,7 +683,7 @@ static inline int usbhci_cfgdesc(FAR struct usbhost_state_s *priv,
static int usbhost_ctrl_cmd(FAR struct usbhost_state_s *priv, static int usbhost_ctrl_cmd(FAR struct usbhost_state_s *priv,
uint8_t type, uint8_t req, uint16_t value, uint8_t type, uint8_t req, uint16_t value,
uint16_t indx, FAR uint8_t *payload, uint16_t index, FAR uint8_t *payload,
uint16_t len) uint16_t len)
{ {
FAR struct usbhost_hubport_s *hport; FAR struct usbhost_hubport_s *hport;
@ -697,7 +697,7 @@ static int usbhost_ctrl_cmd(FAR struct usbhost_state_s *priv,
ctrlreq->req = req; ctrlreq->req = req;
usbhost_putle16(ctrlreq->value, value); usbhost_putle16(ctrlreq->value, value);
usbhost_putle16(ctrlreq->index, indx); usbhost_putle16(ctrlreq->index, index);
usbhost_putle16(ctrlreq->len, len); usbhost_putle16(ctrlreq->len, len);
if (type & USB_REQ_DIR_IN) if (type & USB_REQ_DIR_IN)

View file

@ -77,7 +77,7 @@ int strncmp(FAR const char *, FAR const char *, size_t);
int strcoll(FAR const char *, FAR const char *s2); int strcoll(FAR const char *, FAR const char *s2);
FAR char *strcpy(FAR char *dest, FAR const char *src); FAR char *strcpy(FAR char *dest, FAR const char *src);
FAR char *stpcpy(FAR char *dest, FAR const char *src); FAR char *stpcpy(FAR char *dest, FAR const char *src);
size_t strlcpy(FAR char *dst, FAR const char *src, size_t siz); size_t strlcpy(FAR char *dst, FAR const char *src, size_t size);
FAR char *strncpy(FAR char *, FAR const char *, size_t); FAR char *strncpy(FAR char *, FAR const char *, size_t);
FAR char *stpncpy(FAR char *, FAR const char *, size_t); FAR char *stpncpy(FAR char *, FAR const char *, size_t);
FAR char *strpbrk(FAR const char *, FAR const char *); FAR char *strpbrk(FAR const char *, FAR const char *);
@ -166,10 +166,10 @@ fortify_function(stpncpy) FAR char *stpncpy(FAR char *dest,
fortify_function(strlcpy) size_t strlcpy(FAR char *dst, fortify_function(strlcpy) size_t strlcpy(FAR char *dst,
FAR const char *src, FAR const char *src,
size_t siz) size_t size)
{ {
fortify_assert(siz <= fortify_size(dst, 0)); fortify_assert(size <= fortify_size(dst, 0));
return __real_strlcpy(dst, src, siz); return __real_strlcpy(dst, src, size);
} }
fortify_function(strncpy) FAR char *strncpy(FAR char *dest, fortify_function(strncpy) FAR char *strncpy(FAR char *dest,

View file

@ -274,10 +274,10 @@ fortify_function(wcscpy) FAR wchar_t *wcscpy(FAR wchar_t *dst,
fortify_function(wcslcpy) size_t wcslcpy(FAR wchar_t *dst, fortify_function(wcslcpy) size_t wcslcpy(FAR wchar_t *dst,
FAR const wchar_t *src, FAR const wchar_t *src,
size_t siz) size_t size)
{ {
fortify_assert(siz <= fortify_size(dst, 0) / sizeof(wchar_t)); fortify_assert(size <= fortify_size(dst, 0) / sizeof(wchar_t));
return __real_wcslcpy(dst, src, siz); return __real_wcslcpy(dst, src, size);
} }
fortify_function(wcscat) FAR wchar_t *wcscat(FAR wchar_t *dst, fortify_function(wcscat) FAR wchar_t *wcscat(FAR wchar_t *dst,
@ -290,26 +290,26 @@ fortify_function(wcscat) FAR wchar_t *wcscat(FAR wchar_t *dst,
fortify_function(wcsncat) FAR wchar_t *wcsncat(FAR wchar_t *dst, fortify_function(wcsncat) FAR wchar_t *wcsncat(FAR wchar_t *dst,
FAR const wchar_t *src, FAR const wchar_t *src,
size_t siz) size_t size)
{ {
fortify_assert(siz <= fortify_size(dst, 0) / sizeof(wchar_t)); fortify_assert(size <= fortify_size(dst, 0) / sizeof(wchar_t));
return __real_wcsncat(dst, src, siz); return __real_wcsncat(dst, src, size);
} }
fortify_function(wcslcat) size_t wcslcat(FAR wchar_t *dst, fortify_function(wcslcat) size_t wcslcat(FAR wchar_t *dst,
FAR const wchar_t *src, FAR const wchar_t *src,
size_t siz) size_t size)
{ {
fortify_assert(siz <= fortify_size(dst, 0) / sizeof(wchar_t)); fortify_assert(size <= fortify_size(dst, 0) / sizeof(wchar_t));
return __real_wcslcat(dst, src, siz); return __real_wcslcat(dst, src, size);
} }
fortify_function(wcsncpy) FAR wchar_t *wcsncpy(FAR wchar_t *dst, fortify_function(wcsncpy) FAR wchar_t *wcsncpy(FAR wchar_t *dst,
FAR const wchar_t *src, FAR const wchar_t *src,
size_t siz) size_t size)
{ {
fortify_assert(siz <= fortify_size(dst, 0) / sizeof(wchar_t)); fortify_assert(size <= fortify_size(dst, 0) / sizeof(wchar_t));
return __real_wcsncpy(dst, src, siz); return __real_wcsncpy(dst, src, size);
} }
fortify_function(wcsnrtombs) size_t wcsnrtombs(FAR char *dst, fortify_function(wcsnrtombs) size_t wcsnrtombs(FAR char *dst,

View file

@ -153,15 +153,15 @@ static ssize_t blkoutstream_puts(FAR struct lib_sostream_s *self,
if (offset > 0) if (offset > 0)
{ {
size_t copyin = offset + remain > sectorsize ? size_t copying = offset + remain > sectorsize ?
sectorsize - offset : remain; sectorsize - offset : remain;
memcpy(stream->cache + offset, ptr, copyin); memcpy(stream->cache + offset, ptr, copying);
ptr += copyin; ptr += copying;
offset += copyin; offset += copying;
self->nput += copyin; self->nput += copying;
remain -= copyin; remain -= copying;
if (offset == sectorsize) if (offset == sectorsize)
{ {
@ -189,7 +189,7 @@ static ssize_t blkoutstream_puts(FAR struct lib_sostream_s *self,
else else
{ {
size_t nsector = remain / sectorsize; size_t nsector = remain / sectorsize;
size_t copyin = nsector * sectorsize; size_t copying = nsector * sectorsize;
ret = inode->u.i_bops->write(inode, ptr, sector, nsector); ret = inode->u.i_bops->write(inode, ptr, sector, nsector);
if (ret < 0) if (ret < 0)
@ -197,9 +197,9 @@ static ssize_t blkoutstream_puts(FAR struct lib_sostream_s *self,
return ret; return ret;
} }
ptr += copyin; ptr += copying;
self->nput += copyin; self->nput += copying;
remain -= copyin; remain -= copying;
} }
} }

View file

@ -72,21 +72,21 @@ static ssize_t lzfoutstream_puts(FAR struct lib_outstream_s *self,
FAR struct lzf_header_s *header; FAR struct lzf_header_s *header;
FAR const char *ptr = buf; FAR const char *ptr = buf;
size_t total = len; size_t total = len;
size_t copyin; size_t copying;
size_t outlen; size_t outlen;
ssize_t ret; ssize_t ret;
while (total > 0) while (total > 0)
{ {
copyin = stream->offset + total > LZF_STREAM_BLOCKSIZE ? copying = stream->offset + total > LZF_STREAM_BLOCKSIZE ?
LZF_STREAM_BLOCKSIZE - stream->offset : total; LZF_STREAM_BLOCKSIZE - stream->offset : total;
memcpy(stream->in + stream->offset, ptr, copyin); memcpy(stream->in + stream->offset, ptr, copying);
ptr += copyin; ptr += copying;
stream->offset += copyin; stream->offset += copying;
self->nput += copyin; self->nput += copying;
total -= copyin; total -= copying;
if (stream->offset == LZF_STREAM_BLOCKSIZE) if (stream->offset == LZF_STREAM_BLOCKSIZE)
{ {

View file

@ -101,15 +101,15 @@ static ssize_t mtdoutstream_puts(FAR struct lib_sostream_s *self,
if (offset > 0) if (offset > 0)
{ {
size_t copyin = offset + remain > erasesize ? size_t copying = offset + remain > erasesize ?
erasesize - offset : remain; erasesize - offset : remain;
memcpy(stream->cache + offset, ptr, copyin); memcpy(stream->cache + offset, ptr, copying);
ptr += copyin; ptr += copying;
offset += copyin; offset += copying;
self->nput += copyin; self->nput += copying;
remain -= copyin; remain -= copying;
if (offset == erasesize) if (offset == erasesize)
{ {
@ -143,7 +143,7 @@ static ssize_t mtdoutstream_puts(FAR struct lib_sostream_s *self,
else else
{ {
size_t nblock = remain / erasesize; size_t nblock = remain / erasesize;
size_t copyin = nblock * erasesize; size_t copying = nblock * erasesize;
ret = MTD_ERASE(i_mtd, sblock, nblock); ret = MTD_ERASE(i_mtd, sblock, nblock);
if (ret < 0) if (ret < 0)
@ -158,9 +158,9 @@ static ssize_t mtdoutstream_puts(FAR struct lib_sostream_s *self,
return ret; return ret;
} }
ptr += copyin; ptr += copying;
self->nput += copyin; self->nput += copying;
remain -= copyin; remain -= copying;
} }
} }

View file

@ -155,7 +155,7 @@ static void clock_utc2calendar(time_t days, FAR int *year, FAR int *month,
int min; int min;
int max; int max;
int tmp; int tmp;
bool leapyear; bool leap_year;
/* There is one leap year every four years, so we can get close with the /* There is one leap year every four years, so we can get close with the
* following: * following:
@ -170,11 +170,11 @@ static void clock_utc2calendar(time_t days, FAR int *year, FAR int *month,
* Is this year a leap year? (we'll need this later too) * Is this year a leap year? (we'll need this later too)
*/ */
leapyear = clock_isleapyear(value + EPOCH_YEAR); leap_year = clock_isleapyear(value + EPOCH_YEAR);
/* Get the number of days in the year */ /* Get the number of days in the year */
tmp = (leapyear ? DAYSPERLYEAR : DAYSPERNYEAR); tmp = (leap_year ? DAYSPERLYEAR : DAYSPERNYEAR);
/* Do we have that many days left to account for? */ /* Do we have that many days left to account for? */
@ -187,15 +187,15 @@ static void clock_utc2calendar(time_t days, FAR int *year, FAR int *month,
/* Is the next year a leap year? */ /* Is the next year a leap year? */
leapyear = clock_isleapyear(value + EPOCH_YEAR); leap_year = clock_isleapyear(value + EPOCH_YEAR);
/* Get the number of days in the next year */ /* Get the number of days in the next year */
tmp = (leapyear ? DAYSPERLYEAR : DAYSPERNYEAR); tmp = (leap_year ? DAYSPERLYEAR : DAYSPERNYEAR);
} }
/* At this point, 'value' has the years since 1970 and 'days' has number /* At this point, 'value' has the years since 1970 and 'days' has number
* of days into that year. 'leapyear' is true if the year in 'value' is * of days into that year. 'leap_year' is true if the year in 'value' is
* a leap year. * a leap year.
*/ */
@ -216,7 +216,7 @@ static void clock_utc2calendar(time_t days, FAR int *year, FAR int *month,
* month following the midpoint. * month following the midpoint.
*/ */
tmp = clock_daysbeforemonth(value + 1, leapyear); tmp = clock_daysbeforemonth(value + 1, leap_year);
/* Does the number of days before this month that equal or exceed the /* Does the number of days before this month that equal or exceed the
* number of days we have remaining? * number of days we have remaining?
@ -228,7 +228,7 @@ static void clock_utc2calendar(time_t days, FAR int *year, FAR int *month,
* midpoint, 'value'. Could it be the midpoint? * midpoint, 'value'. Could it be the midpoint?
*/ */
tmp = clock_daysbeforemonth(value, leapyear); tmp = clock_daysbeforemonth(value, leap_year);
if (tmp > days) if (tmp > days)
{ {
/* No... The one we want is somewhere between min and value-1 */ /* No... The one we want is somewhere between min and value-1 */
@ -261,7 +261,7 @@ static void clock_utc2calendar(time_t days, FAR int *year, FAR int *month,
* the selected month * the selected month
*/ */
days -= clock_daysbeforemonth(value, leapyear); days -= clock_daysbeforemonth(value, leap_year);
/* At this point, value has the month into this year (zero based) and days /* At this point, value has the month into this year (zero based) and days
* has number of days into this month (zero based) * has number of days into this month (zero based)

View file

@ -1389,7 +1389,7 @@ static int_fast32_t transtime(int year,
FAR const struct rule_s *rulep, FAR const struct rule_s *rulep,
int_fast32_t offset) int_fast32_t offset)
{ {
int leapyear; int leap_year;
int_fast32_t value; int_fast32_t value;
int i; int i;
int d; int d;
@ -1400,7 +1400,7 @@ static int_fast32_t transtime(int year,
int dow; int dow;
value = 0; value = 0;
leapyear = isleap(year); leap_year = isleap(year);
switch (rulep->r_type) switch (rulep->r_type)
{ {
case JULIAN_DAY: case JULIAN_DAY:
@ -1413,7 +1413,7 @@ static int_fast32_t transtime(int year,
*/ */
value = (rulep->r_day - 1) * SECSPERDAY; value = (rulep->r_day - 1) * SECSPERDAY;
if (leapyear && rulep->r_day >= 60) if (leap_year && rulep->r_day >= 60)
{ {
value += SECSPERDAY; value += SECSPERDAY;
} }
@ -1461,7 +1461,7 @@ static int_fast32_t transtime(int year,
for (i = 1; i < rulep->r_week; ++i) for (i = 1; i < rulep->r_week; ++i)
{ {
if (d + DAYSPERWEEK >= g_mon_lengths[leapyear][rulep->r_mon - 1]) if (d + DAYSPERWEEK >= g_mon_lengths[leap_year][rulep->r_mon - 1])
{ {
break; break;
} }
@ -1474,7 +1474,7 @@ static int_fast32_t transtime(int year,
value = d * SECSPERDAY; value = d * SECSPERDAY;
for (i = 0; i < rulep->r_mon - 1; ++i) for (i = 0; i < rulep->r_mon - 1; ++i)
{ {
value += g_mon_lengths[leapyear][i] * SECSPERDAY; value += g_mon_lengths[leap_year][i] * SECSPERDAY;
} }
break; break;
} }

View file

@ -82,7 +82,7 @@ static void adjust(FAR int *tenx, FAR int *x, int base)
static void normalize(FAR struct tm *tm) static void normalize(FAR struct tm *tm)
{ {
bool leapyear = false; bool leap_year = false;
int year; int year;
for (; ; ) for (; ; )
@ -97,7 +97,7 @@ static void normalize(FAR struct tm *tm)
/* Is this a leap year? */ /* Is this a leap year? */
leapyear = clock_isleapyear(year); leap_year = clock_isleapyear(year);
/* Adjust mday field */ /* Adjust mday field */
@ -106,11 +106,11 @@ static void normalize(FAR struct tm *tm)
tm->tm_mon--; tm->tm_mon--;
if (tm->tm_mon < 0) if (tm->tm_mon < 0)
{ {
tm->tm_mday += g_mon_lengths[leapyear][TM_DECEMBER]; tm->tm_mday += g_mon_lengths[leap_year][TM_DECEMBER];
break; break;
} }
tm->tm_mday += g_mon_lengths[leapyear][tm->tm_mon]; tm->tm_mday += g_mon_lengths[leap_year][tm->tm_mon];
} }
if (tm->tm_mon < 0) if (tm->tm_mon < 0)
@ -118,9 +118,9 @@ static void normalize(FAR struct tm *tm)
continue; continue;
} }
while (tm->tm_mday > g_mon_lengths[leapyear][tm->tm_mon]) while (tm->tm_mday > g_mon_lengths[leap_year][tm->tm_mon])
{ {
tm->tm_mday -= g_mon_lengths[leapyear][tm->tm_mon]; tm->tm_mday -= g_mon_lengths[leap_year][tm->tm_mon];
tm->tm_mon++; tm->tm_mon++;
if (tm->tm_mon > (MONSPERYEAR - 1)) if (tm->tm_mon > (MONSPERYEAR - 1))
{ {
@ -164,13 +164,13 @@ static void normalize(FAR struct tm *tm)
tm->tm_hour -= HOURSPERDAY; tm->tm_hour -= HOURSPERDAY;
tm->tm_mday++; tm->tm_mday++;
if (tm->tm_mday > g_mon_lengths[leapyear][tm->tm_mon]) if (tm->tm_mday > g_mon_lengths[leap_year][tm->tm_mon])
{ {
break; break;
} }
} }
if (tm->tm_mday > g_mon_lengths[leapyear][tm->tm_mon]) if (tm->tm_mday > g_mon_lengths[leap_year][tm->tm_mon])
{ {
continue; continue;
} }
@ -185,7 +185,7 @@ static void normalize(FAR struct tm *tm)
/* Determine the day of the year; -1 because the mday is 1-indexed */ /* Determine the day of the year; -1 because the mday is 1-indexed */
tm->tm_yday = tm->tm_mday - 1 + clock_daysbeforemonth(tm->tm_mon, tm->tm_yday = tm->tm_mday - 1 + clock_daysbeforemonth(tm->tm_mon,
leapyear); leap_year);
/* Finally calculate the weekday */ /* Finally calculate the weekday */

View file

@ -42,27 +42,27 @@
* Name: wcslcat * Name: wcslcat
* *
* Description: * Description:
* Appends src to string dst of size siz (unlike wcsncat, siz is the * Appends src to string dst of size "size" (unlike wcsncat, "size"
* full size of dst, not space left). At most siz-1 characters * is the full size of dst, no space left). At most size-1 characters
* will be copied. Always NUL terminates (unless siz == 0). * will be copied. Always NUL terminates (unless size == 0).
* Returns wcslen(initial dst) + wcslen(src); if retval >= siz, * Returns wcslen(initial dst) + wcslen(src); if retval >= size,
* truncation occurred. * truncation occurred.
* *
* Input Parameters: * Input Parameters:
* dst - the dest wchar string that contains the concatenated string * dst - the dest wchar string that contains the concatenated string
* src - the source wchar string that we need to concatenate * src - the source wchar string that we need to concatenate
* siz - the max length that can be written to the end of the dst string * size - the max length that can be written to the end of the dst string
* *
* Returned Value: * Returned Value:
* The total length of the wchar string that concatenated * The total length of the wchar string that concatenated
* *
****************************************************************************/ ****************************************************************************/
size_t wcslcat(FAR wchar_t *dst, FAR const wchar_t *src, size_t siz) size_t wcslcat(FAR wchar_t *dst, FAR const wchar_t *src, size_t size)
{ {
FAR wchar_t *d = dst; FAR wchar_t *d = dst;
FAR const wchar_t *s = src; FAR const wchar_t *s = src;
size_t n = siz; size_t n = size;
size_t dlen; size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */ /* Find the end of dst and adjust bytes left but don't go past end */
@ -73,7 +73,7 @@ size_t wcslcat(FAR wchar_t *dst, FAR const wchar_t *src, size_t siz)
} }
dlen = d - dst; dlen = d - dst;
n = siz - dlen; n = size - dlen;
if (n == 0) if (n == 0)
{ {

View file

@ -47,17 +47,17 @@
* Name: wcslen * Name: wcslen
* *
* Description: * Description:
* Copy src to string dst of size siz. At most siz-1 characters * Copy src to string dst of size "size". At most size-1 characters
* will be copied. Always NUL terminates (unless siz == 0). * will be copied. Always NUL terminates (unless size == 0).
* Returns wcslen(src); if retval >= siz, truncation occurred. * Returns wcslen(src); if retval >= size, truncation occurred.
* *
****************************************************************************/ ****************************************************************************/
size_t wcslcpy(FAR wchar_t *dst, FAR const wchar_t *src, size_t siz) size_t wcslcpy(FAR wchar_t *dst, FAR const wchar_t *src, size_t size)
{ {
FAR wchar_t *d = dst; FAR wchar_t *d = dst;
FAR const wchar_t *s = src; FAR const wchar_t *s = src;
size_t n = siz; size_t n = size;
/* Copy as many bytes as will fit */ /* Copy as many bytes as will fit */
@ -77,7 +77,7 @@ size_t wcslcpy(FAR wchar_t *dst, FAR const wchar_t *src, size_t siz)
if (n == 0) if (n == 0)
{ {
if (siz != 0) if (size != 0)
{ {
*d = '\0'; /* NUL-terminate dst */ *d = '\0'; /* NUL-terminate dst */
} }

View file

@ -232,14 +232,14 @@ int pmsm_model_elec(FAR struct pmsm_model_f32_s *model,
int pmsm_model_mech(FAR struct pmsm_model_f32_s *model, float load) int pmsm_model_mech(FAR struct pmsm_model_f32_s *model, float load)
{ {
float angle = 0.0f; float angle = 0.0f;
float dir = 0.0f; float dir = 0.0f;
float te = 0.0f; float torque = 0.0f;
float tmp1 = 0.0f; float tmp1 = 0.0f;
float tmp2 = 0.0f; float tmp2 = 0.0f;
float tmp3 = 0.0f; float tmp3 = 0.0f;
float tmp4 = 0.0f; float tmp4 = 0.0f;
float tmp5 = 0.0f; float tmp5 = 0.0f;
DEBUGASSERT(model); DEBUGASSERT(model);
@ -251,11 +251,11 @@ int pmsm_model_mech(FAR struct pmsm_model_f32_s *model, float load)
tmp4 = 1.5f * model->phy.motor.p; tmp4 = 1.5f * model->phy.motor.p;
tmp5 = tmp4 * model->state.i_dq.q; tmp5 = tmp4 * model->state.i_dq.q;
te = tmp5 * tmp3; torque = tmp5 * tmp3;
/* Get new mechanical velocity */ /* Get new mechanical velocity */
tmp1 = te - load; tmp1 = torque - load;
tmp2 = model->per * tmp1 ; tmp2 = model->per * tmp1 ;
tmp3 = tmp2 * model->phy.one_by_iner; tmp3 = tmp2 * model->phy.one_by_iner;

View file

@ -145,14 +145,14 @@ int pmsm_model_elec_b16(FAR struct pmsm_model_b16_s *model,
int pmsm_model_mech_b16(FAR struct pmsm_model_b16_s *model, b16_t load) int pmsm_model_mech_b16(FAR struct pmsm_model_b16_s *model, b16_t load)
{ {
b16_t angle = 0; b16_t angle = 0;
b16_t dir = 0; b16_t dir = 0;
b16_t te = 0; b16_t torque = 0;
b16_t tmp1 = 0; b16_t tmp1 = 0;
b16_t tmp2 = 0; b16_t tmp2 = 0;
b16_t tmp3 = 0; b16_t tmp3 = 0;
b16_t tmp4 = 0; b16_t tmp4 = 0;
b16_t tmp5 = 0; b16_t tmp5 = 0;
DEBUGASSERT(model); DEBUGASSERT(model);
@ -164,11 +164,11 @@ int pmsm_model_mech_b16(FAR struct pmsm_model_b16_s *model, b16_t load)
tmp4 = b16mulb16((b16ONE + b16HALF), itob16(model->phy.motor.p)); tmp4 = b16mulb16((b16ONE + b16HALF), itob16(model->phy.motor.p));
tmp5 = b16mulb16(tmp4, model->state.i_dq.q); tmp5 = b16mulb16(tmp4, model->state.i_dq.q);
te = b16mulb16(tmp5, tmp3); torque = b16mulb16(tmp5, tmp3);
/* Get new mechanical velocity */ /* Get new mechanical velocity */
tmp1 = te - load; tmp1 = torque - load;
tmp2 = b16mulb16(model->per, tmp1); tmp2 = b16mulb16(model->per, tmp1);
tmp3 = b16mulb16(tmp2, model->phy.one_by_iner); tmp3 = b16mulb16(tmp2, model->phy.one_by_iner);

View file

@ -253,7 +253,7 @@ void mm_memdump(FAR struct mm_heap_s *heap,
} }
else else
{ {
name = "Unkown"; name = "Unknown";
tcb = nxsched_get_tcb(pid); tcb = nxsched_get_tcb(pid);
} }

View file

@ -1230,7 +1230,7 @@ void mm_memdump(FAR struct mm_heap_s *heap,
} }
else else
{ {
name = "Unkown"; name = "Unknown";
tcb = nxsched_get_tcb(pid); tcb = nxsched_get_tcb(pid);
} }

View file

@ -61,7 +61,7 @@ int devif_file_send(FAR struct net_driver_s *dev, FAR struct file *file,
unsigned int target_offset) unsigned int target_offset)
{ {
FAR struct iob_s *iob; FAR struct iob_s *iob;
unsigned int copyin; unsigned int copying;
unsigned int remain; unsigned int remain;
int ret; int ret;
@ -122,18 +122,18 @@ int devif_file_send(FAR struct net_driver_s *dev, FAR struct file *file,
iob = iob->io_flink; iob = iob->io_flink;
} }
copyin = CONFIG_IOB_BUFSIZE - copying = CONFIG_IOB_BUFSIZE -
(iob->io_len + iob->io_offset); (iob->io_len + iob->io_offset);
if (copyin > remain) if (copying > remain)
{ {
copyin = remain; copying = remain;
} }
if (copyin > 0) if (copying > 0)
{ {
ret = file_read(file, iob->io_data + ret = file_read(file, iob->io_data +
(iob->io_len + iob->io_offset), (iob->io_len + iob->io_offset),
copyin); copying);
if (ret < 0) if (ret < 0)
{ {
goto errout; goto errout;

View file

@ -491,18 +491,18 @@ int clefiakeyset(unsigned char *rk, const unsigned char *skey)
void clefiaencrypt(unsigned char *ct, const unsigned char *pt, void clefiaencrypt(unsigned char *ct, const unsigned char *pt,
const unsigned char *rk, const int r) const unsigned char *rk, const int r)
{ {
unsigned char rin[16]; unsigned char r_in[16];
unsigned char rout[16]; unsigned char r_out[16];
bytecpy(rin, pt, 16); bytecpy(r_in, pt, 16);
bytexor(rin + 4, rin + 4, rk + 0, 4); /* initial key whitening */ bytexor(r_in + 4, r_in + 4, rk + 0, 4); /* initial key whitening */
bytexor(rin + 12, rin + 12, rk + 4, 4); bytexor(r_in + 12, r_in + 12, rk + 4, 4);
rk += 8; rk += 8;
clefiagfn4(rout, rin, rk, r); /* GFN_{4,r} */ clefiagfn4(r_out, r_in, rk, r); /* GFN_{4,r} */
bytecpy(ct, rout, 16); bytecpy(ct, r_out, 16);
bytexor(ct + 4, ct + 4, rk + r * 8 + 0, 4); /* final key whitening */ bytexor(ct + 4, ct + 4, rk + r * 8 + 0, 4); /* final key whitening */
bytexor(ct + 12, ct + 12, rk + r * 8 + 4, 4); bytexor(ct + 12, ct + 12, rk + r * 8 + 4, 4);
} }

View file

@ -345,15 +345,15 @@ class TelnetDev:
pass pass
def set_file_size(self, filesize): def set_file_size(self, filesize):
self.bytes_transfered = 0 self.bytes_transferred = 0
self.filesize = filesize self.filesize = filesize
self.count = 0 self.count = 0
def show_progress(self, sendsize): def show_progress(self, sendsize):
if PRINT_RAW_COMMAND: if PRINT_RAW_COMMAND:
if self.count < MAX_DOT_COUNT: if self.count < MAX_DOT_COUNT:
self.bytes_transfered = self.bytes_transfered + sendsize self.bytes_transferred = self.bytes_transferred + sendsize
cur_count = int(self.bytes_transfered * MAX_DOT_COUNT / self.filesize) cur_count = int(self.bytes_transferred * MAX_DOT_COUNT / self.filesize)
if MAX_DOT_COUNT < cur_count: if MAX_DOT_COUNT < cur_count:
cur_count = MAX_DOT_COUNT cur_count = MAX_DOT_COUNT
for idx in range(cur_count - self.count): for idx in range(cur_count - self.count):
@ -431,15 +431,15 @@ class SerialDev:
self.serial.setDTR(False) self.serial.setDTR(False)
def set_file_size(self, filesize): def set_file_size(self, filesize):
self.bytes_transfered = 0 self.bytes_transferred = 0
self.filesize = filesize self.filesize = filesize
self.count = 0 self.count = 0
def show_progress(self, sendsize): def show_progress(self, sendsize):
if PRINT_RAW_COMMAND: if PRINT_RAW_COMMAND:
if self.count < MAX_DOT_COUNT: if self.count < MAX_DOT_COUNT:
self.bytes_transfered = self.bytes_transfered + sendsize self.bytes_transferred = self.bytes_transferred + sendsize
cur_count = int(self.bytes_transfered * MAX_DOT_COUNT / self.filesize) cur_count = int(self.bytes_transferred * MAX_DOT_COUNT / self.filesize)
if MAX_DOT_COUNT < cur_count: if MAX_DOT_COUNT < cur_count:
cur_count = MAX_DOT_COUNT cur_count = MAX_DOT_COUNT
for idx in range(cur_count - self.count): for idx in range(cur_count - self.count):

View file

@ -352,10 +352,10 @@ def parse_and_eval(expression: str, global_context: bool = False):
return Value(gdb_value) return Value(gdb_value)
def gdb_eval_or_none(expresssion): def gdb_eval_or_none(expression):
"""Evaluate an expression and return None if it fails""" """Evaluate an expression and return None if it fails"""
try: try:
return parse_and_eval(expresssion) return parse_and_eval(expression)
except gdb.error: except gdb.error:
return None return None

View file

@ -446,7 +446,7 @@ def parse_conditional(lines, conditions):
return defines return defines
def formmatter(args): def formatter(args):
# if pinmap passed is a legacy pinmap. Just generate a report # if pinmap passed is a legacy pinmap. Just generate a report
report_only = args.report is not False report_only = args.report is not False
@ -566,7 +566,7 @@ def main():
"Python 2 is not supported. Please try again using Python 3." "Python 2 is not supported. Please try again using Python 3."
) )
args = parse_args() args = parse_args()
formmatter(args) formatter(args)
if __name__ == "__main__": if __name__ == "__main__":