diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-07-15 16:43:33 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-07-17 08:31:25 +0000 |
| commit | abd11cfd08430ec5f9d2c6dbd0e0f798816922d1 (patch) | |
| tree | 522a8cc072d07d85c8a1d37b5b3ab89483599b48 /pkg/csource/options.go | |
| parent | a81f309b57265e5760b926274e1f1681e7550e41 (diff) | |
all: apply linter auto fixes
./tools/syz-env bin/golangci-lint run ./... --fix
Diffstat (limited to 'pkg/csource/options.go')
| -rw-r--r-- | pkg/csource/options.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/csource/options.go b/pkg/csource/options.go index ba44dd021..02e39980a 100644 --- a/pkg/csource/options.go +++ b/pkg/csource/options.go @@ -125,11 +125,11 @@ func (opts Options) checkLinuxOnly(OS string) error { if OS == targets.Linux { return nil } - if opts.NetInjection && !(OS == targets.OpenBSD || OS == targets.FreeBSD || OS == targets.NetBSD) { + if opts.NetInjection && (OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD) { return fmt.Errorf("option NetInjection is not supported on %v", OS) } if opts.Sandbox == sandboxNamespace || - (opts.Sandbox == sandboxSetuid && !(OS == targets.OpenBSD || OS == targets.FreeBSD || OS == targets.NetBSD)) || + (opts.Sandbox == sandboxSetuid && (OS != targets.OpenBSD && OS != targets.FreeBSD && OS != targets.NetBSD)) || opts.Sandbox == sandboxAndroid { return fmt.Errorf("option Sandbox=%v is not supported on %v", opts.Sandbox, OS) } @@ -248,7 +248,7 @@ func deserializeLegacyOptions(data string, opts *Options) (int, error) { // Support for legacy formats. func deserializeLegacyFormats(data []byte, opts *Options) error { - data = bytes.Replace(data, []byte("Sandbox: "), []byte("Sandbox:empty "), -1) + data = bytes.ReplaceAll(data, []byte("Sandbox: "), []byte("Sandbox:empty ")) strData := string(data) // We can distinguish between legacy formats by the number |
