Switch all calls to open() to explicitly open for read

This commit is contained in:
Jamie Cameron
2020-03-14 17:20:54 -07:00
parent 3093838b5b
commit a2dc3f7124
248 changed files with 548 additions and 552 deletions

View File

@@ -85,7 +85,7 @@ if ($type eq 'mod') {
print $text{'edit_osall'};
}
else {
open(OSLIST, "$root_directory/os_list.txt");
open(OSLIST, "<$root_directory/os_list.txt");
while(<OSLIST>) {
chop;
if (/^([^\t]+)\t+([^\t]+)\t+(\S+)\t+(\S+)\t*(.*)$/) {

View File

@@ -63,7 +63,7 @@ elsif ($in{source} == 2) {
$grant = $in{'grant'} ? undef : [ split(/\s+/, $in{'grantto'}) ];
# Check validity
open(MFILE, $pfile);
open(MFILE, "<$pfile");
read(MFILE, $two, 2);
close(MFILE);
if ($two eq "\037\235") {

View File

@@ -200,7 +200,7 @@ else {
}
# gunzip the file if needed
open(FILE, $file);
open(FILE, "<$file");
read(FILE, $two, 2);
close(FILE);
if ($two eq "\037\213") {