From 339e114d70de3ec2b36edf37d7ba7a7cfdf9d1a6 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 15 Feb 2023 14:26:25 +0000 Subject: [PATCH] patch 9.0.1311: Coverity warns for using a NULL pointer Problem: Coverity warns for using a NULL pointer. Solution: Use "empty_option" instead of NULL. --- src/option.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/option.c b/src/option.c index 717812c9c..1b581ed35 100644 --- a/src/option.c +++ b/src/option.c @@ -1990,6 +1990,8 @@ do_set_option_string( // Set the new value. *(char_u **)(varp) = newval; + if (newval == NULL) + *(char_u **)(varp) = empty_option; #if defined(FEAT_EVAL) if (!starting diff --git a/src/version.c b/src/version.c index a6451cb6a..c59a3a1df 100644 --- a/src/version.c +++ b/src/version.c @@ -695,6 +695,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1311, /**/ 1310, /**/ -- 2.40.0