]>
git.proxmox.com Git - ceph.git/blob - ceph/src/include/err.h
5 * adapted from linux 2.6.24 include/linux/err.h
8 #define IS_ERR_VALUE(x) ((x) >= (uintptr_t)-MAX_ERRNO)
14 /* this generates a warning in c++; caller can do the cast manually
15 static inline void *ERR_PTR(long error)
17 return (void *) error;
21 static inline intptr_t PTR_ERR(const void *ptr
)
23 return (intptr_t) ptr
;
26 static inline bool IS_ERR(const void *ptr
)
28 return IS_ERR_VALUE((uintptr_t)ptr
);