linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in <linux/kernel.h>
[sfrench/cifs-2.6.git] / include / linux / kernel.h
index 5b7ed6dc99accf89059190f01f73adbfa13287ca..2f9d15410c933617d93fc144675de4df17ff955c 100644 (file)
@@ -48,6 +48,8 @@
  */
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
 
+#define PTR_IF(cond, ptr)      ((cond) ? (ptr) : NULL)
+
 #define u64_to_user_ptr(x) (           \
 {                                      \
        typecheck(u64, (x));            \