Skip to content

Commit

Permalink
Using undef seems a bit cleaner to me
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron authored and iliajie committed Apr 23, 2023
1 parent 16a9e01 commit ed39665
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion virtual-server-lib-funcs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13570,7 +13570,7 @@ sub save_links_cache
sub clear_links_cache
{
my (@list) = @_;
@list = (0) if (!@list);
@list = (undef) if (!@list);
foreach my $d (@list) {
opendir(CACHEDIR, $links_cache_dir);
foreach my $f (readdir(CACHEDIR)) {
Expand All @@ -13584,6 +13584,7 @@ sub clear_links_cache
$del = $f =~ /\-\Q$d\E$/ ? 1 : 0;
}
else {
# Deleting everything
$del = 1;
}
&unlink_file("$links_cache_dir/$f") if ($del);
Expand Down

0 comments on commit ed39665

Please sign in to comment.