]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Use "return" instead of "return undef" for some subs
authorJakub Narebski <redacted>
Mon, 25 Sep 2006 23:56:17 +0000 (01:56 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
Use "return" instead of "return undef" when subroutine can return, or
always return, non-scalar (list) value.

Other places are left as is.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index d6f9bae033342a9a4e06ece913480768b19f00a31bb8c280fe709aeeffbb9206..1c4a5276f77476b296c949917a8a870d46e72150d20963a949033e0efcfce8f3 100755 (executable)
@@ -106,7 +106,7 @@ our %feature = (
 
 sub gitweb_check_feature {
        my ($name) = @_;
-       return undef unless exists $feature{$name};
+       return unless exists $feature{$name};
        my ($sub, $override, @defaults) = (
                $feature{$name}{'sub'},
                $feature{$name}{'override'},
@@ -781,7 +781,7 @@ sub git_get_projects_list {
                # 'git%2Fgit.git Linus+Torvalds'
                # 'libs%2Fklibc%2Fklibc.git H.+Peter+Anvin'
                # 'linux%2Fhotplug%2Fudev.git Greg+Kroah-Hartman'
-               open my ($fd), $projects_list or return undef;
+               open my ($fd), $projects_list or return;
                while (my $line = <$fd>) {
                        chomp $line;
                        my ($path, $owner) = split ' ', $line;
This page took 0.218283 seconds and 4 git commands to generate.