提交 a4424bf5 编写于 作者: J James Simmons 提交者: Greg Kroah-Hartman

staging: lustre: libcfs: repair improper unlikely test

The scripts to replace NULL test got confused with the
macro parenthesis so the unlikely test in libcfs_private.h
ended up incorrect. This fixes this error.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJames Simmons <jsimmons@infradead.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5bcf2a92
......@@ -96,7 +96,7 @@ do { \
#define LIBCFS_ALLOC_POST(ptr, size) \
do { \
if (!unlikely((ptr))) { \
if (unlikely(!(ptr))) { \
CERROR("LNET: out of memory at %s:%d (tried to alloc '" \
#ptr "' = %d)\n", __FILE__, __LINE__, (int)(size)); \
} else { \
......@@ -147,7 +147,7 @@ do { \
#define LIBCFS_FREE(ptr, size) \
do { \
if (!unlikely((ptr))) { \
if (unlikely(!(ptr))) { \
CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", (int)(size), __FILE__, __LINE__); \
break; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册