Skip to content

Commit

Permalink
remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Dec 5, 2024
1 parent 8387637 commit 0d5cf99
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion internal/mkcgo/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ func (r *rets) useLongHandleErrorCode(retvar, msg string) string {
if strings.HasSuffix(r.typ, "*") || strings.HasSuffix(strings.ToUpper(r.typ), "_PTR") {
cond = retvar + " == nil"
} else {
cond = retvar + " != " + defaultErrorCodeStr
cond = strings.Replace(r.failCond, "retval", retvar, 1)
}
return fmt.Sprintf(code, cond, msg)
Expand Down
4 changes: 0 additions & 4 deletions internal/mkcgo/mkcgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import (
"strings"
)

var (
defaultErrorCodeStr string
)

var (
fileName = flag.String("out", "", "output file name (standard output if omitted)")
includeHeader = flag.String("include", "", "include header file")
Expand Down

0 comments on commit 0d5cf99

Please sign in to comment.