mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-29 13:28:19 +00: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
@ -164,7 +164,7 @@ static size_t kernel_af_max(void) {
|
|||||||
return net_af_max_override;
|
return net_af_max_override;
|
||||||
|
|
||||||
fd = open(PROC_VERSION, O_RDONLY);
|
fd = open(PROC_VERSION, O_RDONLY);
|
||||||
if (!fd)
|
if (fd == -1)
|
||||||
/* fall back to default provided during build */
|
/* fall back to default provided during build */
|
||||||
return 0;
|
return 0;
|
||||||
res = read(fd, &buffer, sizeof(buffer) - 1);
|
res = read(fd, &buffer, sizeof(buffer) - 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user