Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: Use "return" instead of "return undef" for some subs
author
Jakub Narebski
<jnareb@gmail.com>
Mon, 25 Sep 2006 23:56:17 +0000
(
01:56
+0200)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 27 Sep 2006 07:41:35 +0000
(
00:41
-0700)
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>
gitweb/gitweb.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
4b02f48
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index 4686d9376d05c69f29306eebc29c73ad12db1ecc..eaa42b93cdacf8cc4b6e0b014bec7c94099dccbb 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-106,7
+106,7
@@
sub gitweb_check_feature {
my ($name) = @_;
sub gitweb_check_feature {
my ($name) = @_;
- return un
def un
less exists $feature{$name};
+ return unless exists $feature{$name};
my ($sub, $override, @defaults) = (
$feature{$name}{'sub'},
$feature{$name}{'override'},
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'
# '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;
while (my $line = <$fd>) {
chomp $line;
my ($path, $owner) = split ' ', $line;