erofs-utils: add ERR_CAST macro
PATCH 1/1 erofs-utils: add ERR_CAST macro
Add ERR_CAST macro.
Signed-off-by Jingbo Xu <[email protected]>
--- include/erofs/err.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/erofs/err.h +6 -0
@@ -33,6 +33,12 @@ static inline long PTR_ERR(const void *ptr)return (long ) ptr; } +static inline void *ERR_CAST (const void *ptr) +{ +/* cast away the const */ +return (void *) ptr; +} + #ifdef __cplusplus }#endif
Signature · 1 line
2.19.1.6.gb485710b
Quoted 3 lines · Jingbo Xu
Add
ERR_CASTmacro.Signed-off-by Jingbo Xu <[email protected]>
I'd like to apply it with the following commit message:
"Add ERR_CAST macro to prepare for the upcoming tarerofs feature."
Thanks,
Gao Xiang