From f47f8ad67c6a9567d964d44981dcfbba7803901c Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Tue, 12 Oct 2010 03:44:43 -0400 Subject: [PATCH] simple env variable cleanup (treating empty environment variables as unset) --- Crypt/Monkeysphere/MSVA.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index 8ae6b9b..72c7167 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -115,7 +115,8 @@ my $class = shift; my $port = 0; - if (exists $ENV{MSVA_PORT}) { + if (exists $ENV{MSVA_PORT} and $ENV{MSVA_PORT} ne '') { + msvalog('debug', "MSVA_PORT set to %s\n", $ENV{MSVA_PORT}); $port = $ENV{MSVA_PORT} + 0; die sprintf("not a reasonable port %d", $port) if (($port >= 65536) || $port <= 0); } -- 2.26.2