diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2018-05-28 16:44:13 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2018-05-28 16:48:48 -0400 |
commit | 01deec5f8ae64b5120cc8c93d54fe0e19e477b02 (patch) | |
tree | 8a12cb3dec3429657c9b50071a14d99d079e2e47 /src | |
parent | 6a75b58065c8da69a259657fc40d18e76157f265 (diff) | |
download | postgresql-01deec5f8ae64b5120cc8c93d54fe0e19e477b02.tar.gz postgresql-01deec5f8ae64b5120cc8c93d54fe0e19e477b02.zip |
Return a value from Install.pm's lcopy function
Commit 3a7cc727c was a little over eager about adding an explicit return
to this function, whose value is checked in most call sites. This change
reverses that and returns the expected value explicitly. It also adds a
check to the one call site lacking one.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/msvc/Install.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index 6f1c30546ae..429608fde61 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -37,10 +37,10 @@ sub lcopy unlink $target || confess "Could not delete $target\n"; } - copy($src, $target) + (my $retval = copy($src, $target)) || confess "Could not copy $src to $target\n"; - return; + return $retval; } sub Install @@ -200,7 +200,7 @@ sub CopyFiles print "."; $f = $basedir . $f; die "No file $f\n" if (!-f $f); - lcopy($f, $target . basename($f)); + lcopy($f, $target . basename($f)) || croak "Could not copy $f: $!\n"; } print "\n"; return; |