1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

Clean up boolean condition

This commit is contained in:
Tyler Davis 2020-07-07 18:02:06 +10:00
parent 9473d01f0f
commit 8d28f1b305

View File

@ -612,7 +612,7 @@ func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]M
blocks := make([]string, 16)
for _, line := range lines {
fields := strings.Fields(line)
if len(fields) > 0 && strings.HasSuffix(fields[0], ":") == false {
if len(fields) > 0 && !strings.HasSuffix(fields[0], ":") {
// new block section
if len(blocks) > 0 {
g, err := getBlock(fields, blocks)