Skip to content

Commit

Permalink
Change name
Browse files Browse the repository at this point in the history
Signed-off-by: grantseltzer <grantseltzer@gmail.com>
  • Loading branch information
grantseltzer committed Jun 24, 2022
1 parent e772271 commit 42e5405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libbpfgo.go
Expand Up @@ -922,10 +922,10 @@ func (b *BPFMap) DeleteKey(key unsafe.Pointer) error {
// bpfmap.Update(keyPtr, valuePtr)
//
func (b *BPFMap) Update(key, value unsafe.Pointer) error {
return b.UpdateWithFlags(key, value, MapFlagUpdateAny)
return b.UpdateValueFlags(key, value, MapFlagUpdateAny)
}

func (b *BPFMap) UpdateWithFlags(key, value unsafe.Pointer, flags MapFlag) error {
func (b *BPFMap) UpdateValueFlags(key, value unsafe.Pointer, flags MapFlag) error {
errC := C.bpf_map_update_elem(b.fd, key, value, C.ulonglong(flags))
if errC != 0 {
return fmt.Errorf("failed to update map %s: %w", b.name, syscall.Errno(-errC))
Expand Down

0 comments on commit 42e5405

Please sign in to comment.