Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: parseSysctlVal 代码错误? #328

Open
hanqingwu opened this issue May 21, 2024 · 0 comments · May be fixed by #340
Open

bug: parseSysctlVal 代码错误? #328

hanqingwu opened this issue May 21, 2024 · 0 comments · May be fixed by #340
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@hanqingwu
Copy link

hanqingwu commented May 21, 2024

pkg/inspect/sysctl_inspect.go

 func parseSysctlVal(val []string) string {
-       if len(val) == 0 && val == nil {
+       if len(val) == 0 || val == nil {
                return ""
        }
        return val[0]

此处是否应该修订下, 如果val 是空数组,应返回 “”

@hanqingwu hanqingwu added the kind/bug Categorizes issue or PR as related to a bug. label May 21, 2024
@hiyongliz hiyongliz linked a pull request Oct 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant