Skip to content

Commit

Permalink
chore: typos
Browse files Browse the repository at this point in the history
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
  • Loading branch information
cfc4n committed Aug 16, 2024
1 parent 0f0ac82 commit 822ad59
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg/event_processor/base_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (be *BaseEvent) StringHex() string {
var prefix, connInfo string
switch AttachType(be.DataType) {
case ProbeEntry:
connInfo = fmt.Sprintf("Recived %d bytes", be.DataLen)
connInfo = fmt.Sprintf("Received %d bytes", be.DataLen)
case ProbeRet:
connInfo = fmt.Sprintf("Send %d bytes", be.DataLen)
default:
Expand All @@ -156,7 +156,7 @@ func (be *BaseEvent) String() string {
var connInfo string
switch AttachType(be.DataType) {
case ProbeEntry:
connInfo = fmt.Sprintf("Recived %dbytes", be.DataLen)
connInfo = fmt.Sprintf("Received %dbytes", be.DataLen)
case ProbeRet:
connInfo = fmt.Sprintf("Send %d bytes", be.DataLen)
default:
Expand Down
2 changes: 1 addition & 1 deletion pkg/event_processor/iworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (ew *eventWorker) Run() {
ew.processor.delWorkerByUUID(ew)

/*
When returned from delWorkerByUUID(), there are two possiblities:
When returned from delWorkerByUUID(), there are two possibilities:
1) no routine can touch it.
2) one routine can still touch ew because getWorkerByUUID()
*happen before* delWorkerByUUID()
Expand Down
6 changes: 3 additions & 3 deletions user/module/probe_openssl_lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ func (m *MOpenSSLProbe) detectOpenssl(soPath string) error {
break
}

// Substracting OpenSslVersionLen from totalReadCount,
// Subtracting OpenSslVersionLen from totalReadCount,
// to cover the edge-case in which openssl version string
// could be split into two buffers. Substraction will,
// could be split into two buffers. Subtraction will,
// makes sure that last 30 bytes of previous buffer are considered.
totalReadCount += readCount - OpenSslVersionLen

Expand All @@ -213,7 +213,7 @@ func (m *MOpenSSLProbe) detectOpenssl(soPath string) error {
}

f.Close()
buf = nil
buf = buf[:0]

var bpfFile string
var found bool
Expand Down
2 changes: 1 addition & 1 deletion user/module/probe_pcap.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (t *MTCProbe) writePid(tcEvent *event.TcSkbEvent) (error, []byte) {

oldEthLayer := ethPacket.Layers()[0].(*layers.Ethernet)

// subtract oldethelayer from the begining of ethpacket
// subtract oldethelayer from the beginning of ethpacket
restOfLayers := ethPacket.Layers()[1:]
remainder := []byte{}
for _, layer := range restOfLayers {
Expand Down

0 comments on commit 822ad59

Please sign in to comment.