Skip to content
Open
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 c.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func insnToC(insn instruction, blk *block) ([]string, error) {
}
}

func packetLoadToC(size int, offsetFmt string, offsetArgs ...interface{}) ([]string, error) {
func packetLoadToC(size int, offsetFmt string, offsetArgs ...any) ([]string, error) {
offset := fmt.Sprintf(offsetFmt, offsetArgs...)

switch size {
Expand All @@ -237,7 +237,7 @@ func packetLoadToC(size int, offsetFmt string, offsetArgs ...interface{}) ([]str
return nil, errors.Errorf("unsupported load size %d", size)
}

func condToC(skipTrue, skipFalse skip, blk *block, condFmt string, condArgs ...interface{}) ([]string, error) {
func condToC(skipTrue, skipFalse skip, blk *block, condFmt string, condArgs ...any) ([]string, error) {
cond := fmt.Sprintf(condFmt, condArgs...)

if skipFalse == 0 {
Expand All @@ -247,6 +247,6 @@ func condToC(skipTrue, skipFalse skip, blk *block, condFmt string, condArgs ...i
return stat("if (%s) goto %s; else goto %s;", cond, blk.skipToBlock(skipTrue).Label(), blk.skipToBlock(skipFalse).Label())
}

func stat(format string, a ...interface{}) ([]string, error) {
func stat(format string, a ...any) ([]string, error) {
return []string{fmt.Sprintf(format, a...)}, nil
}