• Daniel Martí's avatar
    cmd/trace: fix a few bugs found by staticcheck · 64a832de
    Daniel Martí authored
    First, the regions sort was buggy, as its last comparison was
    ineffective.
    
    Second, the insyscall and insyscallRuntime fields were unsigned, so the
    check for them being negative was pointless. Make them signed instead,
    to also prevent the possibility of underflows when decreasing numbers
    that might realistically be 0.
    
    Third, the color constants were all untyped strings except the first
    one. Be consistent with their typing.
    
    Change-Id: I4eb8d08028ed92589493c2a4b9cc5a88d83f769b
    Reviewed-on: https://go-review.googlesource.com/113895
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    Reviewed-by: 's avatarHyang-Ah Hana Kim <hyangah@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    64a832de
Name
Last commit
Last update
..
annotations.go Loading commit data...
annotations_test.go Loading commit data...
doc.go Loading commit data...
goroutines.go Loading commit data...
main.go Loading commit data...
pprof.go Loading commit data...
trace.go Loading commit data...
trace_test.go Loading commit data...
trace_unix_test.go Loading commit data...