@matheusbsbs / matheus-bagliano / commits / dd1ad5f167
Fork 0

gitweb: Use "return" instead of "return undef" for some subs

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 <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Sep 26, 2006 at 01:56 UTC dd1ad5f16708e49722ad455dea8076816054391d
1 file changed +2 -2
gitweb/gitweb.perl
+2 -2
@@ -106,7 +106,7 @@ our %feature = (
106
107 sub gitweb_check_feature {
108 my ($name) = @_;
109 - return undef unless exists $feature{$name};
109 + return unless exists $feature{$name};
110 my ($sub, $override, @defaults) = (
111 $feature{$name}{'sub'},
112 $feature{$name}{'override'},
@@ -781,7 +781,7 @@ sub git_get_projects_list {
781 # 'git%2Fgit.git Linus+Torvalds'
782 # 'libs%2Fklibc%2Fklibc.git H.+Peter+Anvin'
783 # 'linux%2Fhotplug%2Fudev.git Greg+Kroah-Hartman'
784 - open my ($fd), $projects_list or return undef;
784 + open my ($fd), $projects_list or return;
785 while (my $line = <$fd>) {
786 chomp $line;
787 my ($path, $owner) = split ' ', $line;