Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in comment section #1161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pcapgo/ngread.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ func (r *NgReader) getUint64(buffer []byte) uint64 {

// Now the pcapng implementation

// readBlock reads a the blocktype and length from the file. If the type is a section header, endianess is also read.
// readBlock reads a the blocktype and length from the file. If the type is a section header, endianness is also read.
func (r *NgReader) readBlock() error {
if err := r.readBytes(r.buf[0:8]); err != nil {
return err
}
r.currentBlock.typ = ngBlockType(r.getUint32(r.buf[0:4]))
// The next part is a bit fucked up since a section header could change the endianess...
// So first read then length just into a buffer, check if its a section header and then do the endianess part...
// The next part is a bit fucked up since a section header could change the endianness...
// So first read then length just into a buffer, check if its a section header and then do the endianness part...
if r.currentBlock.typ == ngBlockTypeSectionHeader {
if err := r.readBytes(r.buf[8:12]); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion pfring/pfring.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct metadata {
// struct (struct metadata above).
// Another way to do this, would be to store the struct offsets in defines
// and use encoding/binary in go-land. But this has the downside, that there is
// no native endianess in encoding/binary and storing ByteOrder in a variable
// no native endianness in encoding/binary and storing ByteOrder in a variable
// leads to an expensive itab lookup + call (instead of very fast inlined and
// optimized movs). Using unsafe magic could lead to problems with unaligned
// access.
Expand Down