diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-07 01:51:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-07 01:51:09 +0000 |
| commit | f02a5a7bdaafc1c5ff61aee133eb2b6ba5f57586 (patch) | |
| tree | a31410fcb58551837968944f83ae6a3dd6df10d6 | |
| parent | cf86adba61d7ae93f129823eb65a0dcaf3df70c5 (diff) | |
| download | rneovim-f02a5a7bdaafc1c5ff61aee133eb2b6ba5f57586.tar.gz rneovim-f02a5a7bdaafc1c5ff61aee133eb2b6ba5f57586.tar.bz2 rneovim-f02a5a7bdaafc1c5ff61aee133eb2b6ba5f57586.zip | |
chore(typval): return NULL over false for pointer return type (#17316)
While we're at it, abort() for an unhandled v_type.
| -rw-r--r-- | src/nvim/eval/typval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index e583ce49b2..6f8b032d41 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -3205,8 +3205,9 @@ const char *tv_get_string_buf_chk(const typval_T *const tv, char *const buf) case VAR_BLOB: case VAR_UNKNOWN: emsg(_(str_errors[tv->v_type])); - return false; + return NULL; } + abort(); return NULL; } |