target_fetchurl: Handle undefined $c{HttpProxy}
PATCH 1/1 target_fetchurl: Handle undefined $c{HttpProxy}
Avoiding a usage of a potentially undefined variable.
Signed-off-by Ian Campbell <[email protected]>
--- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/TestSupport.pm +1 -1
@@ -1823,7 +1823,7 @@ END sub target_fetchurl($$$;$) { my ($ho, $url, $path, $timeo) = @_; $timeo ||= 2000; - my $useproxy = "export http_proxy=$c{HttpProxy};" if $c{HttpProxy}; + my $useproxy = $c{HttpProxy} ? "export http_proxy=$c{HttpProxy};" : ""; target_cmd_root($ho, <<END, $timeo); $useproxy wget --progress=dot:mega -O \Q$path\E \Q$url\E END
Signature · 1 line
2.6.1
Ian Campbell writes ("[PATCH OSSTEST] target_fetchurl: Handle undefined $c{HttpProxy}"):
Quoted 1 line
Avoiding a usage of a potentially undefined variable.
Acked-by Ian Jackson <[email protected]>