Mercurial > vim
comparison src/evalfunc.c @ 14752:c54f69fabee9 v8.1.0388
patch 8.1.0388: Coverity complains about possible NULL pointer use
commit https://github.com/vim/vim/commit/bf1c1b85136bbbe55a50c9cd01ed064d8df75697
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 13 21:30:05 2018 +0200
patch 8.1.0388: Coverity complains about possible NULL pointer use
Problem: Coverity complains about possible NULL pointer use.
Solution: Use get_tv_string() instead of get_tv_string_chk().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 13 Sep 2018 21:45:05 +0200 |
parents | 00da090af0ab |
children | a179e5cfcab7 |
comparison
equal
deleted
inserted
replaced
14751:b4cfad5cfb6d | 14752:c54f69fabee9 |
---|---|
13073 | 13073 |
13074 if (argvars[0].v_type != VAR_STRING) | 13074 if (argvars[0].v_type != VAR_STRING) |
13075 EMSG(_(e_invarg)); | 13075 EMSG(_(e_invarg)); |
13076 else | 13076 else |
13077 { | 13077 { |
13078 name = get_tv_string_chk(&argvars[0]); | 13078 name = get_tv_string(&argvars[0]); |
13079 if (reset_option_was_set(name) == FAIL) | 13079 if (reset_option_was_set(name) == FAIL) |
13080 EMSG2(_(e_invarg2), name); | 13080 EMSG2(_(e_invarg2), name); |
13081 } | 13081 } |
13082 } | 13082 } |
13083 | 13083 |