Skip to content

Commit b3158e6

Browse files
Fix typos (#4472)
* leave api name unchanged so don't break API
1 parent c8f7a7f commit b3158e6

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

core/shared/utils/bh_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ b_memcpy_wa(void *s1, unsigned int s1max, const void *s2, unsigned int n)
5959
*dest++ = *p_byte_read++;
6060
}
6161
}
62-
/* read meaning word(s) */
62+
/* read remaining word(s) */
6363
else {
6464
if ((char *)p + 4 >= src + n) {
6565
for (ps = (char *)p; ps < src + n; ps++) {

core/shared/utils/bh_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ bh_free_msg(bh_queue_node *msg)
170170
return;
171171
}
172172

173-
// note: sometime we just use the payload pointer for a integer value
173+
// note: sometimes we just use the payload pointer for an integer value
174174
// len!=0 is the only indicator about the body is an allocated buffer.
175175
if (msg->body && msg->len)
176176
bh_queue_free(msg->body);

core/shared/utils/runtime_timer.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ bh_get_tick_ms()
4444
uint32
4545
bh_get_elpased_ms(uint32 *last_system_clock)
4646
{
47-
uint32 elpased_ms;
48-
/* attention: the bh_get_tick_ms() return 64 bits integer, but
49-
the bh_get_elpased_ms() is designed to use 32 bits clock count */
47+
uint32 elapsed_ms;
48+
/* attention: the bh_get_tick_ms() returns a 64-bit integer, but
49+
bh_get_elpased_ms() is designed to use a 32-bit clock count */
5050
uint32 now = (uint32)bh_get_tick_ms();
5151

5252
/* system clock overrun */
5353
if (now < *last_system_clock) {
5454
PRINT("system clock overrun!\n");
55-
elpased_ms = now + (UINT32_MAX - *last_system_clock) + 1;
55+
elapsed_ms = now + (UINT32_MAX - *last_system_clock) + 1;
5656
}
5757
else {
58-
elpased_ms = now - *last_system_clock;
58+
elapsed_ms = now - *last_system_clock;
5959
}
6060

6161
*last_system_clock = now;
62-
return elpased_ms;
62+
return elapsed_ms;
6363
}
6464

6565
static app_timer_t *
@@ -162,7 +162,7 @@ reschedule_timer(timer_ctx_t ctx, app_timer_t *timer)
162162
prev->id);
163163
}
164164
else {
165-
/* insert at the begin */
165+
/* insert at the beginning */
166166
bh_assert(ctx->app_timers == NULL);
167167
ctx->app_timers = timer;
168168
PRINT("rescheduled timer [%d] as first\n", timer->id);
@@ -213,7 +213,7 @@ release_timer_list(app_timer_t **p_list)
213213

214214
timer_ctx_t
215215
create_timer_ctx(timer_callback_f timer_handler,
216-
check_timer_expiry_f expiery_checker, int prealloc_num,
216+
check_timer_expiry_f expiry_checker, int prealloc_num,
217217
unsigned int owner)
218218
{
219219
timer_ctx_t ctx = (timer_ctx_t)BH_MALLOC(sizeof(struct _timer_ctx));
@@ -225,7 +225,7 @@ create_timer_ctx(timer_callback_f timer_handler,
225225

226226
ctx->timer_callback = timer_handler;
227227
ctx->pre_allocated = prealloc_num;
228-
ctx->refresh_checker = expiery_checker;
228+
ctx->refresh_checker = expiry_checker;
229229
ctx->owner = owner;
230230

231231
while (prealloc_num > 0) {

0 commit comments

Comments
 (0)