aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ipc/ipc.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-08 18:48:26 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-08 18:48:26 +0100
commit36d1c4540af3ef058d68092e41af05aa4a8c5eca (patch)
tree3657a5920e4b100749ccb9d2d555652e7b7e28e9 /pkg/ipc/ipc.go
parent63ef857906766b3cafe4aebc43bc38edf42096c3 (diff)
all: fix gometalinter warnings
Fix typos, non-canonical code, remove dead code, etc.
Diffstat (limited to 'pkg/ipc/ipc.go')
-rw-r--r--pkg/ipc/ipc.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go
index fbce12efa..104be74d2 100644
--- a/pkg/ipc/ipc.go
+++ b/pkg/ipc/ipc.go
@@ -528,6 +528,8 @@ type executeReply struct {
status uint32
}
+// TODO(dvyukov): we currently parse this manually, should cast output to this struct instead.
+/*
type callReply struct {
callIndex uint32
callNum uint32
@@ -539,6 +541,7 @@ type callReply struct {
compsSize uint32
// signal/cover/comps follow
}
+*/
func makeCommand(pid int, bin []string, config *Config, inFile *os.File, outFile *os.File) (*command, error) {
dir, err := ioutil.TempDir("./", "syzkaller-testdir")
@@ -782,7 +785,7 @@ func (c *command) exec(opts *ExecOpts, progData []byte) (output []byte, failed,
hang <- false
}
}()
- exitStatus := 0
+ var exitStatus int
if c.config.Flags&FlagUseForkServer == 0 {
restart = true
c.cmd.Wait()
@@ -849,9 +852,3 @@ func (c *command) exec(opts *ExecOpts, progData []byte) (output []byte, failed,
}
return
}
-
-func serializeUint64(buf []byte, v uint64) {
- for i := 0; i < 8; i++ {
- buf[i] = byte(v >> (8 * uint(i)))
- }
-}