Mercurial > vim
comparison src/vim9execute.c @ 19215:45c062fa2156 v8.2.0166
patch 8.2.0166: Coverity warning for using uninitialized variable
Commit: https://github.com/vim/vim/commit/07da94b0f07beb15c7e26b78837def5a91e102dc
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 28 22:39:19 2020 +0100
patch 8.2.0166: Coverity warning for using uninitialized variable
Problem: Coverity warning for using uninitialized variable.
Solution: Check for failure.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 28 Jan 2020 22:45:04 +0100 |
parents | 9f98957582d6 |
children | 1235c26d9f04 |
comparison
equal
deleted
inserted
replaced
19214:5d7bcea37d94 | 19215:45c062fa2156 |
---|---|
568 typval_T optval; | 568 typval_T optval; |
569 char_u *name = iptr->isn_arg.string; | 569 char_u *name = iptr->isn_arg.string; |
570 | 570 |
571 if (ga_grow(&ectx.ec_stack, 1) == FAIL) | 571 if (ga_grow(&ectx.ec_stack, 1) == FAIL) |
572 goto failed; | 572 goto failed; |
573 get_env_tv(&name, &optval, TRUE); | 573 if (get_env_tv(&name, &optval, TRUE) == FAIL) |
574 { | |
575 semsg(_("E1060: Invalid environment variable name: %s"), | |
576 iptr->isn_arg.string); | |
577 goto failed; | |
578 } | |
574 *STACK_TV_BOT(0) = optval; | 579 *STACK_TV_BOT(0) = optval; |
575 ++ectx.ec_stack.ga_len; | 580 ++ectx.ec_stack.ga_len; |
576 } | 581 } |
577 break; | 582 break; |
578 | 583 |