Commit 2f00b7cc authored by Rusty Russell's avatar Rusty Russell

mem: switch descriptions for memeqzero/memeqstr

Closes: #32
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 3e7b9b50
...@@ -144,7 +144,10 @@ static inline bool memstarts(void const *data, size_t data_len, ...@@ -144,7 +144,10 @@ static inline bool memstarts(void const *data, size_t data_len,
* } * }
*/ */
PURE_FUNCTION PURE_FUNCTION
bool memeqzero(const void *data, size_t length); static inline bool memeqstr(const void *data, size_t length, const char *string)
{
return memeq(data, length, string, strlen(string));
}
/** /**
* memeqzero - Is a byte array all zeroes? * memeqzero - Is a byte array all zeroes?
...@@ -157,10 +160,7 @@ bool memeqzero(const void *data, size_t length); ...@@ -157,10 +160,7 @@ bool memeqzero(const void *data, size_t length);
* } * }
*/ */
PURE_FUNCTION PURE_FUNCTION
static inline bool memeqstr(const void *data, size_t length, const char *string) bool memeqzero(const void *data, size_t length);
{
return memeq(data, length, string, strlen(string));
}
/** /**
* memstarts_str - Does this byte array start with a string prefix? * memstarts_str - Does this byte array start with a string prefix?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment