diff --git a/gitweb.cgi.source b/gitweb.cgi.source
index 0e5c626..5db2fbb 100755
--- a/gitweb.cgi.source
+++ b/gitweb.cgi.source
@@ -452,7 +452,7 @@ my %allowed_options = (
);
our @extra_options = $cgi->param('opt');
-if (defined @extra_options) {
+if (@extra_options) {
foreach my $opt (@extra_options) {
if (not exists $allowed_options{$opt}) {
die_error(400, "Invalid option parameter");
diff --git a/gitweb.cgi.source.new b/gitweb.cgi.source.new
index 92b5cbc..2eb6b96 100644
--- a/gitweb.cgi.source.new
+++ b/gitweb.cgi.source.new
@@ -1190,7 +1190,7 @@ sub git_summary {
print "";
my $taglist = git_read_refs("refs/tags");
- if (defined @$taglist) {
+ if (@$taglist) {
print "
\n" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tags"), -class => "title"}, "tags") .
"
\n";
@@ -1243,7 +1243,7 @@ sub git_summary {
}
my $headlist = git_read_refs("refs/heads");
- if (defined @$headlist) {
+ if (@$headlist) {
print "\n" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=heads"), -class => "title"}, "heads") .
"
\n";
@@ -1321,7 +1321,7 @@ sub git_tags {
"\n";
print "\n";
my $alternate = 0;
- if (defined @$taglist) {
+ if (@$taglist) {
foreach my $entry (@$taglist) {
my %tag = %$entry;
my $comment_lines = $tag{'comment'};
@@ -1373,7 +1373,7 @@ sub git_heads {
"\n";
print "\n";
my $alternate = 0;
- if (defined @$taglist) {
+ if (@$taglist) {
foreach my $entry (@$taglist) {
my %tag = %$entry;
if ($alternate) {