1
0
Fork 0

staging: lustre: libcfs: remove NULL comparisons in headers

Remove the NULL comparisions in the libcfs headers.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
James Simmons 2016-11-18 11:48:42 -05:00 committed by Greg Kroah-Hartman
parent e230dd8bb2
commit 27b83b3f5b
2 changed files with 3 additions and 3 deletions

View File

@ -818,7 +818,7 @@ cfs_hash_djb2_hash(const void *key, size_t size, unsigned int mask)
{
unsigned int i, hash = 5381;
LASSERT(key != NULL);
LASSERT(key);
for (i = 0; i < size; i++)
hash = hash * 33 + ((char *)key)[i];

View File

@ -96,7 +96,7 @@ do { \
#define LIBCFS_ALLOC_POST(ptr, size) \
do { \
if (unlikely((ptr) == NULL)) { \
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) == NULL)) { \
if (!unlikely((ptr))) { \
CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", (int)(size), __FILE__, __LINE__); \
break; \