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:
John Johansen 2014-10-25 16:26:07 -04:00
parent 8e2a7304cb
commit 542f6301e9

View file

@ -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);