aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-12-06 20:20:33 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-12-06 20:20:33 -0500
commitfa9d44374b84e6768142e8d3751fe215c14796c7 (patch)
tree5422027aa6c7b720dde36e7c1c24a146cc119f8c
parent01fc0efdcaeefab5510a9c37ba4dd28e5638263a (diff)
parent4964d65362ca80ba8508cb5f2a03b49510c63631 (diff)
downloadrneovim-fa9d44374b84e6768142e8d3751fe215c14796c7.tar.gz
rneovim-fa9d44374b84e6768142e8d3751fe215c14796c7.tar.bz2
rneovim-fa9d44374b84e6768142e8d3751fe215c14796c7.zip
Merge pull request #1589 from splinterofchaos/fix-const-atter
strings: Remove NONNUL_ALL from NULL-taking functions.
-rw-r--r--src/nvim/strings.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c
index 20008bca16..1e619b1c6e 100644
--- a/src/nvim/strings.c
+++ b/src/nvim/strings.c
@@ -237,13 +237,9 @@ char_u *vim_strnsave_up(const char_u *string, size_t len)
void vim_strup(char_u *p)
FUNC_ATTR_NONNULL_ALL
{
- char_u *p2;
char_u c;
-
- if (p != NULL) {
- p2 = p;
- while ((c = *p2) != NUL)
- *p2++ = (char_u)((c < 'a' || c > 'z') ? c : c - 0x20);
+ while ((c = *p) != NUL) {
+ *p++ = (char_u)(c < 'a' || c > 'z' ? c : c - 0x20);
}
}
@@ -525,7 +521,7 @@ void sort_strings(char_u **files, int count)
* When "s" is NULL false is returned.
*/
bool has_non_ascii(const char_u *s)
- FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE
+ FUNC_ATTR_PURE
{
const char_u *p;