Skip to content

Update socketcan_linux.go - #18

Open
rainervonuns wants to merge 1 commit into
notnil:mainfrom
rainervonuns:patch-1
Open

Update socketcan_linux.go#18
rainervonuns wants to merge 1 commit into
notnil:mainfrom
rainervonuns:patch-1

Conversation

@rainervonuns

Copy link
Copy Markdown

Clean up code: removed unused function, which caused a failure during cross build for 32bit architecture.
Bits word width varies by arch (int64 on amd64/arm64, int32 on 386/arm).

Alternative could be:

func fdSetAdd(set *syscall.FdSet, fd int) {
	const wordBits = 8 * int(unsafe.Sizeof(set.Bits[0]))
	set.Bits[fd/wordBits] |= 1 << uint(fd%wordBits)
}

Since the function is never called --> remove

Clean up code: removed unused function, which caused a failure during cross build for 32bit architecture.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant