Skip to content

Commit 3992b6e

Browse files
committed
Remove leftover fmt.Errorf() after merging shift width check
I merged two PRs successively, and broke builds: - eaafb3a "Reject cBPF shifts > 31" added a new errors.Errorf() call. - 71323da "Replace github.com/pkg/errors with stdlib" dropped the errors package. Change the added errors.Errorf() call over to fmt.Errorf() too.
1 parent e512fd5 commit 3992b6e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cbpfc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ func validateInstructions(insns []bpf.Instruction) error {
398398
switch i.Op {
399399
case bpf.ALUOpShiftLeft, bpf.ALUOpShiftRight:
400400
if i.Val >= 32 {
401-
return errors.Errorf("instruction %d shifts by %d, must be less than 32: %v", pc, i.Val, insn)
401+
return fmt.Errorf("instruction %d shifts by %d, must be less than 32: %v", pc, i.Val, insn)
402402
}
403403
}
404404
}

0 commit comments

Comments
 (0)