Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83848
b: refs/heads/master
c: d1bc8e9
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Feb 7, 2008
1 parent 34a8fad commit 88eb166
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae5e29798afa2b11a01fcb4fab8b58fee47fe155
refs/heads/master: d1bc8e95445224276d7896b8b08cbb0b28a0ca80
13 changes: 13 additions & 0 deletions trunk/include/linux/err.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ static inline long IS_ERR(const void *ptr)
return IS_ERR_VALUE((unsigned long)ptr);
}

/**
* ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
* @ptr: The pointer to cast.
*
* Explicitly cast an error-valued pointer to another pointer type in such a
* way as to make it clear that's what's going on.
*/
static inline void *ERR_CAST(const void *ptr)
{
/* cast away the const */
return (void *) ptr;
}

#endif

#endif /* _LINUX_ERR_H */

0 comments on commit 88eb166

Please sign in to comment.