aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-15 20:36:13 -0400
committerGitHub <noreply@github.com>2021-05-15 20:36:13 -0400
commit6ab83f35724737a7b74cfee0d21abe7c815f0a1a (patch)
tree1ba010375f371963fea6f0b765ecbca7bda30d84 /src/nvim/ex_getln.c
parentd67dcaba02d76fe92ba818dde7b672fe6956a100 (diff)
downloadrneovim-6ab83f35724737a7b74cfee0d21abe7c815f0a1a.tar.gz
rneovim-6ab83f35724737a7b74cfee0d21abe7c815f0a1a.tar.bz2
rneovim-6ab83f35724737a7b74cfee0d21abe7c815f0a1a.zip
Add 'FUNC_ATTR_NONNULL_RET' to nonnull alloc funcs (#14559)
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 43762e8d6b..75ed5dc0e5 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3571,6 +3571,7 @@ static void save_cmdline(struct cmdline_info *ccp)
* Restore ccline after it has been saved with save_cmdline().
*/
static void restore_cmdline(struct cmdline_info *ccp)
+ FUNC_ATTR_NONNULL_ALL
{
ccline = *ccp;
}
@@ -3580,6 +3581,7 @@ static void restore_cmdline(struct cmdline_info *ccp)
* passed to restore_cmdline_alloc() later.
*/
char_u *save_cmdline_alloc(void)
+ FUNC_ATTR_NONNULL_RET
{
struct cmdline_info *p = xmalloc(sizeof(struct cmdline_info));
save_cmdline(p);
@@ -3590,6 +3592,7 @@ char_u *save_cmdline_alloc(void)
* Restore the command line from the return value of save_cmdline_alloc().
*/
void restore_cmdline_alloc(char_u *p)
+ FUNC_ATTR_NONNULL_ALL
{
restore_cmdline((struct cmdline_info *)p);
xfree(p);