From ccf8012f283ce075c9b962cf461fdb4fdc06ee7c Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 22 Apr 2023 20:20:39 +0200 Subject: [PATCH] CLEANUP: assorted typo fixes in the code and comments This is 36th iteration of typo fixes --- doc/lua-api/index.rst | 2 +- include/haproxy/stconn-t.h | 2 +- src/hlua.c | 10 +++++----- src/hlua_fcn.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/lua-api/index.rst b/doc/lua-api/index.rst index f7b453e731..66d5da67fd 100644 --- a/doc/lua-api/index.rst +++ b/doc/lua-api/index.rst @@ -1338,7 +1338,7 @@ Server class care about a single server, and also prevents useless wakeups. For instance, if you want to be notified for UP/DOWN events on a given set of - servers, it is recommended to peform multiple per-server subscriptions since + servers, it is recommended to perform multiple per-server subscriptions since it will be more efficient that doing a single global subscription that will filter the received events. Unless you really want to be notified for servers events of ALL servers of diff --git a/include/haproxy/stconn-t.h b/include/haproxy/stconn-t.h index dd76a94229..fe10950b6c 100644 --- a/include/haproxy/stconn-t.h +++ b/include/haproxy/stconn-t.h @@ -153,7 +153,7 @@ enum sc_flags { SC_FL_NEED_BUFF = 0x00000100, /* SC waits for an rx buffer allocation to complete */ SC_FL_NEED_ROOM = 0x00000200, /* SC needs more room in the rx buffer to store incoming data */ - SC_FL_RCV_ONCE = 0x00000400, /* Don't loop to receive data. cleared after a sucessful receive */ + SC_FL_RCV_ONCE = 0x00000400, /* Don't loop to receive data. cleared after a successful receive */ SC_FL_SND_ASAP = 0x00000800, /* Don't wait for sending. cleared when all data were sent */ SC_FL_SND_NEVERWAIT = 0x00001000, /* Never wait for sending (permanent) */ SC_FL_SND_EXP_MORE = 0x00001000, /* More data expected to be sent very soon. cleared when all data were sent */ diff --git a/src/hlua.c b/src/hlua.c index a758f627f1..b14ac838f8 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -9113,7 +9113,7 @@ static struct task *hlua_event_runner(struct task *task, void *context, unsigned /* We reached the limit of pending events in the queue: we should * warn the user, and temporarily pause the subscription to give a chance - * to the handler to catch up? (it also prevents ressource shortage since + * to the handler to catch up? (it also prevents resource shortage since * the queue could grow indefinitely otherwise) * TODO: find a way to inform the handler that it missed some events * (example: stats within the subscription in event_hdl api exposed via lua api?) @@ -9176,7 +9176,7 @@ static struct task *hlua_event_runner(struct task *task, void *context, unsigned RESET_SAFE_LJMP(hlua_sub->hlua); /* At this point the event was successfully translated into hlua ctx, - * or hlua error occured, so we can safely discard it + * or hlua error occurred, so we can safely discard it */ event_hdl_async_free_event(event); event = NULL; @@ -9199,7 +9199,7 @@ static struct task *hlua_event_runner(struct task *task, void *context, unsigned task_wakeup(task, TASK_WOKEN_OTHER); } else if (hlua_sub->paused) { - /* empty queue, the handler catched up: resume the subscription */ + /* empty queue, the handler caught up: resume the subscription */ event_hdl_resume(hlua_sub->sub); hlua_sub->paused = 0; } @@ -9307,7 +9307,7 @@ __LJMP static struct event_hdl_sub_type hlua_check_event_sub_types(lua_State *L, /* Wrapper for hlua_fcn_new_event_sub(): catch errors raised by * the function to prevent LJMP * - * If no error occured, the function returns 1, else it returns 0 and + * If no error occurred, the function returns 1, else it returns 0 and * the error message is pushed at the top of the stack */ __LJMP static int _hlua_new_event_sub_safe(lua_State *L) @@ -9327,7 +9327,7 @@ static int hlua_new_event_sub_safe(lua_State *L, struct event_hdl_sub *sub) case LUA_OK: return 1; default: - /* error was catched */ + /* error was caught */ return 0; } } diff --git a/src/hlua_fcn.c b/src/hlua_fcn.c index f275c54342..188fcf4fdb 100644 --- a/src/hlua_fcn.c +++ b/src/hlua_fcn.c @@ -1023,7 +1023,7 @@ int hlua_server_get_name(lua_State *L) } /* __index metamethod for server class - * support for additionnal keys that are missing from the main table + * support for additional keys that are missing from the main table * stack:1 = table (server class), stack:2 = requested key * Returns 1 if key is supported * else returns 0 to make lua return NIL value to the caller @@ -1567,7 +1567,7 @@ int hlua_proxy_get_uuid(lua_State *L) } /* __index metamethod for proxy class - * support for additionnal keys that are missing from the main table + * support for additional keys that are missing from the main table * stack:1 = table (proxy class), stack:2 = requested key * Returns 1 if key is supported * else returns 0 to make lua return NIL value to the caller