]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util/lua: spelling
authorVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 05:12:52 +0000 (07:12 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
src/util-lua-smtp.c
src/util-lua.h
src/util-luajit.c

index 7804dfd04454149858707cef48f6040dd5f9f207..38966e93d8b0091c369e2afe0fe12706aa036528 100644 (file)
@@ -61,7 +61,7 @@ static int GetMimeDecField(lua_State *luastate, Flow *flow, const char *name)
 {
     /* extract state from flow */
     SMTPState *state = (SMTPState *) FlowGetAppState(flow);
-    /* check that state exsists */
+    /* check that state exists */
     if(state == NULL) {
         return LuaCallbackError(luastate, "Internal error: no state in flow");
     }
@@ -70,13 +70,13 @@ static int GetMimeDecField(lua_State *luastate, Flow *flow, const char *name)
     if(smtp_tx == NULL) {
         return LuaCallbackError(luastate, "Transaction ending or not found");
     }
-    /* pointer to tail of msg list of MimeDecEntitys in current transaction. */
+    /* pointer to tail of msg list of MimeDecEntities in current transaction. */
     MimeDecEntity *mime = smtp_tx->msg_tail;
     /* check if msg_tail was hit */
     if(mime == NULL){
         return LuaCallbackError(luastate, "Internal error: no fields in transaction");
     }
-    /* extract MIME field based on spesific field name. */
+    /* extract MIME field based on specific field name. */
     MimeDecField *field = MimeDecFindField(mime, name);
     /* check MIME field */
     if(field == NULL) {
@@ -203,7 +203,7 @@ static int SMTPGetMimeList(lua_State *luastate)
  * \param flow flow to get state for SMTP
  *
  * \retval 1 if mailfrom field found.
- * Retruns error int and msg pushed to luastate stack if error occurs
+ * Returns error int and msg pushed to luastate stack if error occurs
  */
 
 static int GetMailFrom(lua_State *luastate, Flow *flow)
@@ -233,7 +233,7 @@ static int GetMailFrom(lua_State *luastate, Flow *flow)
  * \param luastate luastate stack to pop and push attributes for I/O to lua.
  *
  * \retval 1 if mailfrom field found.
- * Retruns error int and msg pushed to luastate stack if error occurs
+ * Returns error int and msg pushed to luastate stack if error occurs
  */
 
 static int SMTPGetMailFrom(lua_State *luastate)
@@ -257,7 +257,7 @@ static int SMTPGetMailFrom(lua_State *luastate)
  * \brief intern function used by SMTPGetRcpList
  *
  * \params luastate luastate stack for internal communication with Lua.
- * Used to hand over data to the recieveing luascript.
+ * Used to hand over data to the receiving luascript.
  *
  * \retval 1 if the table is pushed to lua.
  * Returns error int and msg pushed to luastate stack if error occurs
@@ -287,7 +287,7 @@ static int GetRcptList(lua_State *luastate, Flow *flow)
         LuaPushStringBuffer(luastate, rcpt->str, rcpt->len);
         lua_settable(luastate, -3);
     }
-    /* return 1 since we allways push one table to luastate */
+    /* return 1 since we always push one table to luastate */
     return 1;
 }
 
@@ -297,7 +297,7 @@ static int GetRcptList(lua_State *luastate, Flow *flow)
  * Then pushing it to the luastate stack.
  *
  * \params luastate luastate stack for internal communication with Lua.
- * Used to hand over data to the recieveing luascript.
+ * Used to hand over data to the receiving luascript.
  *
  * \retval 1 if the table is pushed to lua.
  * Returns error int and msg pushed to luastate stack if error occurs
@@ -317,7 +317,7 @@ static int SMTPGetRcptList(lua_State *luastate)
 
     GetRcptList(luastate, flow);
 
-    /* return 1 since we allways push one table to luastate */
+    /* return 1 since we always push one table to luastate */
     return 1;
 }
 
index 4de94005446fca9f4b35275c8fcaa41e9bca8c80..471692526c557b3f7f0f820023e61ebae839aac6 100644 (file)
@@ -54,7 +54,7 @@ uint64_t LuaStateGetTxId(lua_State *luastate);
 
 /** \brief get flow pointer from lua state
  *
- *  \retval f flow poiner or NULL if it was not set
+ *  \retval f flow pointer or NULL if it was not set
  */
 Flow *LuaStateGetFlow(lua_State *luastate);
 
index acaf7b8223c955cb960c4d3d0173c371d7503894..a089e139cfcf08dee7daa050e2abbd958a89a39b 100644 (file)
@@ -37,7 +37,7 @@
  *  of getting the states. We protect the pool with a lock as the detect
  *  threads access it during their init and cleanup.
  *
- *  Pool size is automagically determined based on number of keyword occurences,
+ *  Pool size is automagically determined based on number of keyword occurrences,
  *  cpus/cores and rule reloads being enabled or not.
  *
  *  Alternatively, the "detect-engine.luajit-states" var can be set.