Do not silently truncate files on perlasm errors
[oweals/openssl.git] / crypto / ripemd / asm / rmd-586.pl
index 72bcbcc9aa1ca9f4ec83c073bec0737b97d3e798..45f03eb36b90f9d2500c9e0dfe9a3f0f321e0c7b 100644 (file)
@@ -1,7 +1,7 @@
 #! /usr/bin/env perl
 # Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
 #
-# Licensed under the OpenSSL license (the "License").  You may not use
+# Licensed under the Apache License 2.0 (the "License").  You may not use
 # this file except in compliance with the License.  You can obtain a copy
 # in the file LICENSE in the source distribution or at
 # https://www.openssl.org/source/license.html
@@ -16,8 +16,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
-$output=pop;
-open STDOUT,">$output";
+$output=pop and open STDOUT,">$output";
 
 &asm_init($ARGV[0]);
 
@@ -70,7 +69,7 @@ $KR3=0x7A6D76E9;
 &ripemd160_block("ripemd160_block_asm_data_order");
 &asm_finish();
 
-close STDOUT;
+close STDOUT or die "error closing STDOUT";
 
 sub Xv
        {
@@ -339,7 +338,6 @@ sub ripemd160_block
                          # aligned. The good news are that gcc-2.95
                          # and later does keep first argument at
                          # least double-wise aligned.
-                         #                     <appro@fy.chalmers.se>
 
        &set_label("start") unless $normal;
        &comment("");