diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-25 10:58:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 10:58:50 +0000 |
commit | dbe770e3ce2ac2e34ffa8e28b80df57eb0182a68 (patch) | |
tree | b6150971630be9329563a581fdf3857bbbece256 /libpod | |
parent | 6618d574b93ed179b5044fa2e283ddeb9b927446 (diff) | |
parent | d7662edf66b703b86d4405c86f3cf7dc2291689e (diff) | |
download | podman-dbe770e3ce2ac2e34ffa8e28b80df57eb0182a68.tar.gz podman-dbe770e3ce2ac2e34ffa8e28b80df57eb0182a68.tar.bz2 podman-dbe770e3ce2ac2e34ffa8e28b80df57eb0182a68.zip |
Merge pull request #12079 from stweil/lgtm
[NO NEW TESTS NEEDED] Fix off-by-one index comparision (reported by LGTM)
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/info.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/info.go b/libpod/info.go index a2fd18491..8d0b19f23 100644 --- a/libpod/info.go +++ b/libpod/info.go @@ -332,7 +332,7 @@ func readKernelVersion() (string, error) { return "", err } f := bytes.Fields(buf) - if len(f) < 2 { + if len(f) < 3 { return string(bytes.TrimSpace(buf)), nil } return string(f[2]), nil |