From 980ea56d724b4d5107a16963dea6e12a537bb8f8 Mon Sep 17 00:00:00 2001 From: Marcel Moura Date: Fri, 27 Mar 2020 21:05:20 +0000 Subject: [PATCH] fixup! add XDPLua --- samples/bpf/xdplua_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/bpf/xdplua_user.c b/samples/bpf/xdplua_user.c index 66462c3919dea9..6003eed8c9229e 100644 --- a/samples/bpf/xdplua_user.c +++ b/samples/bpf/xdplua_user.c @@ -57,7 +57,8 @@ static char *extract_lua_prog(const char *path) lua_prog = (char *) malloc(prog_size + 1); memset(lua_prog, 0, prog_size + 1); - if (fread(lua_prog, 1, prog_size, f) < 0) { + size_t read = fread(lua_prog, 1, prog_size, f); + if (read < 0) { perror("unable to read lua file"); return NULL; }