From 412d246be71bd99cb4edde4e6f984b0b0d91bcd9 Mon Sep 17 00:00:00 2001 From: Scott Prager Date: Sun, 3 May 2015 09:25:53 -0400 Subject: getenv: return NULL if empty #2574 Making an environment variable empty can be a way of unsetting it for platforms that don't support unsetenv(). In most cases, we treat empty variables as having been unset. For all others, use os_env_exists(). --- src/nvim/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/diff.c') diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 7c1a9de623..6e2b3056e4 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -808,7 +808,7 @@ static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff) /* We don't want $DIFF_OPTIONS to get in the way. */ if (os_getenv("DIFF_OPTIONS")) { - vim_setenv("DIFF_OPTIONS", ""); + os_unsetenv("DIFF_OPTIONS"); } /* Build the diff command and execute it. Always use -a, binary -- cgit