mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
fix: incorrect test of open return value
Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
parent
8e2a7304cb
commit
542f6301e9
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ static size_t kernel_af_max(void) {
|
|||
return net_af_max_override;
|
||||
|
||||
fd = open(PROC_VERSION, O_RDONLY);
|
||||
if (!fd)
|
||||
if (fd == -1)
|
||||
/* fall back to default provided during build */
|
||||
return 0;
|
||||
res = read(fd, &buffer, sizeof(buffer) - 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue