diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-29 22:48:23 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-29 22:48:23 -0500 |
commit | 3e665efea47911bcbe94485dd35efa4c3062c662 (patch) | |
tree | c5058e31d662c66bc5fb0b701d234f58fb9f7517 /src/nvim/memory.c | |
parent | 75524dbf9ac0013305fa4357066c36f41784a87c (diff) | |
parent | f75de5e671699fbcff93bb9715916a02b5c7b37d (diff) | |
download | rneovim-3e665efea47911bcbe94485dd35efa4c3062c662.tar.gz rneovim-3e665efea47911bcbe94485dd35efa4c3062c662.tar.bz2 rneovim-3e665efea47911bcbe94485dd35efa4c3062c662.zip |
Merge pull request #1497 from splinterofchaos/const-attr
constify and func-attribute memory.c and strings.c
Diffstat (limited to 'src/nvim/memory.c')
-rw-r--r-- | src/nvim/memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c index 4c5a45b8b6..f959ea55e4 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -305,6 +305,7 @@ char *xstpncpy(char *restrict dst, const char *restrict src, size_t maxlen) /// @param size Size of destination buffer /// @return Length of the source string (i.e.: strlen(src)) size_t xstrlcpy(char *restrict dst, const char *restrict src, size_t size) + FUNC_ATTR_NONNULL_ALL { size_t ret = strlen(src); @@ -348,7 +349,7 @@ char *xstrdup(const char *str) /// @param c The byte to search for. /// @param len The length of the memory object. /// @returns a pointer to the found byte in src[len], or NULL. -void *xmemrchr(void *src, uint8_t c, size_t len) +void *xmemrchr(const void *src, uint8_t c, size_t len) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE { while (len--) { |