Skip to content

Commit

Permalink
cc: extend cc_util module (#196)
Browse files Browse the repository at this point in the history
- cc_strnlen as wrapper for strnlen function
  • Loading branch information
michalbiesek authored and Yao Yue committed Jul 11, 2019
1 parent 4846b15 commit da240e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/cc_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ extern "C" {
#define cc_strlen(_s) \
strlen((char *)(_s))

#define cc_strnlen(_s, _n) \
strnlen((char *)(_s), (size_t)(_n))

#define cc_strcmp(_s1, _s2) \
strcmp((char *)(_s1), (char *)(_s2))

Expand Down

0 comments on commit da240e5

Please sign in to comment.