diff options
author | Stefan Reinauer <reinauer@google.com> | 2017-08-16 16:45:57 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-18 14:27:23 -0700 |
commit | 55acd6957e5ae3d9916b39e57a8a4e52ad720fd1 (patch) | |
tree | 2daa99df7c5224e7644c7a4747b62fb18f36e1e2 /include/util.h | |
parent | 9ca5e791cc817b665b0a1bd20155c63649a31b99 (diff) | |
download | chrome-ec-55acd6957e5ae3d9916b39e57a8a4e52ad720fd1.tar.gz |
common: Use SVr4/4.3BSD/C89/C99 prototype for strlen
SVr4/4.3BSD/C89/C99 use a return value of size_t. To
make interaction with code running on both userland
and on the EC easier, change our function prototype
to return size_t as well.
Signed-off-by: Stefan Reinauer <reinauer@google.com>
BRANCH=none
BUG=none
TEST=make buildall -j works
Change-Id: I0f097c4d0db4232d888e1d54e6c1d22f4859a112
Reviewed-on: https://chromium-review.googlesource.com/618269
Commit-Ready: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/util.h')
-rw-r--r-- | include/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/util.h b/include/util.h index a2395674e9..bf3405728a 100644 --- a/include/util.h +++ b/include/util.h @@ -70,7 +70,7 @@ void *memmove(void *dest, const void *src, size_t len); void *memchr(const void *buffer, int c, size_t n); int strcasecmp(const char *s1, const char *s2); int strncasecmp(const char *s1, const char *s2, size_t size); -int strlen(const char *s); +size_t strlen(const char *s); size_t strnlen(const char *s, size_t maxlen); char *strncpy(char *dest, const char *src, size_t n); int strncmp(const char *s1, const char *s2, size_t n); |