Mercurial > vim
comparison src/eval.c @ 22021:514d622473af v8.2.1560
patch 8.2.1560: using NULL pointers in some code
Commit: https://github.com/vim/vim/commit/9c2b06637b32742cac11bfd66b1a4e84583c6c2e
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 1 19:56:15 2020 +0200
patch 8.2.1560: using NULL pointers in some code
Problem: Using NULL pointers in some code. (James McCoy)
Solution: Avoid adding to a NULL pointer. Use byte as unsigned.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 01 Sep 2020 20:00:03 +0200 |
parents | a9e60176dcd3 |
children | 7899b4e2880c |
comparison
equal
deleted
inserted
replaced
22020:8449d4a87818 | 22021:514d622473af |
---|---|
393 evalarg_T *evalarg) | 393 evalarg_T *evalarg) |
394 { | 394 { |
395 typval_T rettv; | 395 typval_T rettv; |
396 int res; | 396 int res; |
397 int vim9script = in_vim9script(); | 397 int vim9script = in_vim9script(); |
398 garray_T *gap = &evalarg->eval_ga; | 398 garray_T *gap = evalarg == NULL ? NULL : &evalarg->eval_ga; |
399 int save_flags = evalarg == NULL ? 0 : evalarg->eval_flags; | 399 int save_flags = evalarg == NULL ? 0 : evalarg->eval_flags; |
400 int evaluate = evalarg == NULL | 400 int evaluate = evalarg == NULL |
401 ? FALSE : (evalarg->eval_flags & EVAL_EVALUATE); | 401 ? FALSE : (evalarg->eval_flags & EVAL_EVALUATE); |
402 | 402 |
403 if (vim9script && evaluate | 403 if (vim9script && evaluate |