Skip to content

Commit

Permalink
epoll: fix eventFd.add
Browse files Browse the repository at this point in the history
eventFd.add hardcoded the value to add to 1 instead of using the
argument. This hasn't caused a bug since we never call add with
a different value.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
  • Loading branch information
lmb committed May 10, 2024
1 parent c55aa05 commit 1803440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/epoll/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (efd *eventFd) close() error {

func (efd *eventFd) add(n uint64) error {
var buf [8]byte
internal.NativeEndian.PutUint64(buf[:], 1)
internal.NativeEndian.PutUint64(buf[:], n)
_, err := efd.file.Write(buf[:])
return err
}
Expand Down

0 comments on commit 1803440

Please sign in to comment.