mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-17 17:19:35 +08:00
macros.pl: be a bit more careful with open()
Be a bit more strict with open() calls. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
c357381da4
commit
d4ca24338b
@ -37,7 +37,7 @@ sub charcify(@) {
|
||||
#
|
||||
# Generate macros.c
|
||||
#
|
||||
open(OUT,">macros.c") or die "unable to open macros.c\n";
|
||||
open(OUT,"> macros.c\0") or die "unable to open macros.c\n";
|
||||
|
||||
print OUT "/*\n";
|
||||
print OUT " * Do not edit - this file auto-generated by macros.pl from:\n";
|
||||
@ -60,7 +60,7 @@ my $lastname;
|
||||
my $z;
|
||||
|
||||
foreach $fname ( @ARGV ) {
|
||||
open(INPUT,$fname) or die "unable to open $fname\n";
|
||||
open(INPUT,"< $fname\0") or die "$0: $fname: $!\n";
|
||||
while (<INPUT>) {
|
||||
$line++;
|
||||
chomp;
|
||||
|
Loading…
Reference in New Issue
Block a user