Skip to content

Commit

Permalink
gitweb: Use "return" instead of "return undef" for some subs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Sep 27, 2006
1 parent 4b02f48 commit dd1ad5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

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'},
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit dd1ad5f

Please sign in to comment.