Skip to content

Commit

Permalink
src: various comment spelling fixes
Browse files Browse the repository at this point in the history
Thanks to Josh Soref.
  • Loading branch information
victorjulien committed May 8, 2023
1 parent 8d016fe commit 9a4231d
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/alert-debuglog.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef struct AlertDebugLogThread_ {
} AlertDebugLogThread;

/**
* \brief Function to log the FlowVars in to alert-debug.log
* \brief Function to log the FlowVars into alert-debug.log
*
* \param aft Pointer to AlertDebugLog Thread
* \param p Pointer to the packet
Expand Down Expand Up @@ -115,7 +115,7 @@ static void AlertDebugLogFlowVars(AlertDebugLogThread *aft, const Packet *p)
}

/**
* \brief Function to log the PktVars in to alert-debug.log
* \brief Function to log the PktVars into alert-debug.log
*
* \param aft Pointer to AlertDebugLog Thread
* \param p Pointer to the packet
Expand Down
2 changes: 1 addition & 1 deletion src/alert-syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* \author Gurvinder Singh <[email protected]>
*
* Logs alerts in a line based text format in to syslog.
* Logs alerts in a line based text format into syslog.
*
*/

Expand Down
3 changes: 1 addition & 2 deletions src/app-layer-htp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2184,10 +2184,9 @@ static int HTPCallbackResponseStart(htp_tx_t *tx)
SCReturnInt(HTP_OK);
}


/**
* \brief callback for request to store the recent incoming request
in to the recent_in_tx for the given htp state
into the recent_in_tx for the given htp state
* \param connp pointer to the current connection parser which has the htp
* state in it as user data
*/
Expand Down
2 changes: 1 addition & 1 deletion src/app-layer-smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ static int SMTPProcessRequest(SMTPState *state, Flow *f, AppLayerParserState *ps
SMTPTransaction *tx = state->curr_tx;

/* If current input is to be discarded because it completes a long line,
* line's length and delimeter len are reset to 0. Skip processing this line.
* line's length and delimiter len are reset to 0. Skip processing this line.
* This line is only to get us out of the state where we should discard any
* data till LF. */
if (line->len == 0 && line->delim_len == 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/app-layer-ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ static int SSLv3ParseHandshakeProtocol(SSLState *ssl_state, const uint8_t *input
continue;
}

/* if the message lenght exceeds our input_len, we have a tls fragment. */
/* if the message length exceeds our input_len, we have a tls fragment. */
if (record_len > input_len) {
const uint32_t avail = input_len;
const uint32_t size = avail + (4096 - (avail % 4096));
Expand Down
2 changes: 1 addition & 1 deletion src/detect-content.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ void DetectContentFree(DetectEngineCtx *de_ctx, void *ptr)
* \param max_size Maximum buffer/data size allowed.
* \param list signature match list.
* \param len Maximum length required
* \param offset Maximum offset encounted
* \param offset Maximum offset encountered
*
* Note that negated content does not contribute to the maximum
* required size value. However, each negated content's values
Expand Down
2 changes: 1 addition & 1 deletion src/detect-filestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static int FilestorePostMatchWithOptions(Packet *p, Flow *f, const DetectFilesto
if (this_file) {
FileStoreFileById(fc, file_id);
} else if (this_tx) {
/* set in AppLayerTxData. Parsers and logger will propegate it to the
/* set in AppLayerTxData. Parsers and logger will propagate it to the
* individual files, both new and current. */
void *txv = AppLayerParserGetTx(f->proto, f->alproto, f->alstate, tx_id);
DEBUG_VALIDATE_BUG_ON(txv == NULL);
Expand Down
2 changes: 1 addition & 1 deletion src/output-eve-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static TmEcode EveStreamLogThreadInit(ThreadVars *t, const void *initdata, void
goto error_exit;
}

/** Use the Ouptut Context (file pointer and mutex) */
/** Use the Output Context (file pointer and mutex) */
aft->stream_ctx = ((OutputCtx *)initdata)->data;
aft->ctx = CreateEveThreadCtx(t, aft->stream_ctx->eve_ctx);
if (!aft->ctx) {
Expand Down
4 changes: 2 additions & 2 deletions src/source-af-xdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ typedef struct AFXDPThreadVars_ {
char iface[AFXDP_IFACE_NAME_LENGTH];
uint32_t ifindex;

/* AF_XDP stucture */
/* AF_XDP structure */
struct UmemInfo umem;
struct XskSockInfo xsk;
uint32_t gro_flush_timeout;
Expand Down Expand Up @@ -263,7 +263,7 @@ static inline void AFXDPDumpCounters(AFXDPThreadVars *ptv)
/**
* \brief Init function for socket creation.
*
* Mutex used to synchonise initialisation - each socket opens a
* Mutex used to synchronise initialisation - each socket opens a
* different queue. The specific order in which each queue is
* opened is not important, but it is vital the queue_num's
* are different.
Expand Down
18 changes: 9 additions & 9 deletions src/tests/stream-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ static int StreamTcpTest14(void)

StreamTcpUTInit(&stt.ra_ctx);

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string, strlen(dummy_conf_string));
Expand Down Expand Up @@ -1509,7 +1509,7 @@ static int StreamTcpTest15(void)

StreamTcpUTInit(&stt.ra_ctx);

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down Expand Up @@ -1671,7 +1671,7 @@ static int StreamTcpTest16(void)

StreamTcpUTInit(&stt.ra_ctx);

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down Expand Up @@ -1834,7 +1834,7 @@ static int StreamTcpTest17(void)

StreamTcpUTInit(&stt.ra_ctx);

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down Expand Up @@ -1982,7 +1982,7 @@ static int StreamTcpTest18(void)
StreamTcpUTInit(&stt.ra_ctx);
SCHInfoCleanResources();

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down Expand Up @@ -2029,7 +2029,7 @@ static int StreamTcpTest19(void)
StreamTcpUTInit(&stt.ra_ctx);
SCHInfoCleanResources();

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down Expand Up @@ -2079,7 +2079,7 @@ static int StreamTcpTest20(void)
StreamTcpUTInit(&stt.ra_ctx);
SCHInfoCleanResources();

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down Expand Up @@ -2129,7 +2129,7 @@ static int StreamTcpTest21(void)
StreamTcpUTInit(&stt.ra_ctx);
SCHInfoCleanResources();

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down Expand Up @@ -2179,7 +2179,7 @@ static int StreamTcpTest22(void)
StreamTcpUTInit(&stt.ra_ctx);
SCHInfoCleanResources();

/* Load the config string in to parser */
/* Load the config string into parser */
ConfCreateContextBackup();
ConfInit();
ConfYamlLoadString(dummy_conf_string1, strlen(dummy_conf_string1));
Expand Down
5 changes: 3 additions & 2 deletions src/util-cidr.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
#include "util-debug.h"
#include "util-unittest.h"

/** \brief turn 32 bit mask into CIDR
* \retval cidr cidr value or -1 if the netmask can't be expressed as cidr
/** \brief Turn 32 bit mask into CIDR
*
* \retval cidr The cidr value or -1 if the netmask can't be expressed as cidr
*/
int CIDRFromMask(uint32_t netmask)
{
Expand Down
2 changes: 1 addition & 1 deletion src/util-ebpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static bool EBPFCreateFlowForKey(struct flows_stats *flowstats, LiveDevice *dev,
return false;

/* set accounting, we can't know the direction, so let's just start to
* server then if we already have something in to server to client. We need
* serve them if we already have something from server to client. We need
* these numbers as we will use it to see if we have new traffic coming
* on the flow */
FlowBypassInfo *fc = FlowGetStorageById(f, GetFlowBypassInfoID());
Expand Down
4 changes: 2 additions & 2 deletions src/util-lua-smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int SMTPGetMailFrom(lua_State *luastate)
/**
* \brief intern function used by SMTPGetRcpList
*
* \params luastate luastate stack for internal communication with Lua.
* \param luastate luastate stack for internal communication with Lua.
* Used to hand over data to the receiving luascript.
*
* \retval 1 if the table is pushed to lua.
Expand Down Expand Up @@ -296,7 +296,7 @@ static int GetRcptList(lua_State *luastate, Flow *flow)
* flow->SMTPState->SMTPTransaction, adding all items to a table.
* Then pushing it to the luastate stack.
*
* \params luastate luastate stack for internal communication with Lua.
* \param luastate luastate stack for internal communication with Lua.
* Used to hand over data to the receiving luascript.
*
* \retval 1 if the table is pushed to lua.
Expand Down
2 changes: 1 addition & 1 deletion src/util-mpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct MpmPattern_ {
uint8_t *original_pat;
/* case sensitive */
uint8_t *cs;
/* case INsensitive */
/* case insensitive */
uint8_t *ci;
/* pattern id */
uint32_t id;
Expand Down
2 changes: 1 addition & 1 deletion src/util-print.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void PrintBufferRawLineHex(char *nbuf, int *offset, int max_size, const uint8_t
}

/**
* \brief print a buffer as hex on a single line in to retbuf buffer
* \brief print a buffer as hex on a single line into retbuf buffer
*
* Prints in the format "00 AA BB"
*
Expand Down

0 comments on commit 9a4231d

Please sign in to comment.