commit: 9f988d2587fe96e5ff44f8074dafa9c3924aaefb
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Sep 15 03:32:42 2025 +0000
Commit: Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Mon Sep 15 03:33:43 2025 +0000
URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=9f988d25
Drop the $mode parameter of the fopen() subroutine
For the mode is no longer required to be anything other than '<'.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
locale-gen | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/locale-gen b/locale-gen
index 05dabcf..13a9223 100644
--- a/locale-gen
+++ b/locale-gen
@@ -581,8 +581,8 @@ sub copy_security_context ($src_path, $dst_path) {
}
}
-sub fopen ($path, $mode = '<') {
- if (! open my $fh, $mode, $path) {
+sub fopen ($path) {
+ if (! open my $fh, '<', $path) {
die "$PROGRAM: Can't open '$path': $!\n";
} elsif (! -f $fh && canonpath($path) !~ m/^\/dev\/(null|stdin)\z/n) {
die "$PROGRAM: Won't open '$path' because it is not a regular
file\n";