forked from extern/shorewall_code
Invert logic in Shorewall::Chains::delete_reference() - better readability
- similar change in Shorewall::Chains::adjust_reference_counts() Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
390ac30be8
commit
419ff8903b
@ -1927,7 +1927,7 @@ sub delete_reference( $$ ) {
|
||||
|
||||
assert( $toref );
|
||||
|
||||
delete $toref->{references}{$fromref->{name}} unless --$toref->{references}{$fromref->{name}} > 0;
|
||||
delete $toref->{references}{$fromref->{name}} if --$toref->{references}{$fromref->{name}} <= 0;
|
||||
}
|
||||
|
||||
#
|
||||
@ -2065,7 +2065,7 @@ sub adjust_reference_counts( $$$ ) {
|
||||
my ($toref, $name1, $name2) = @_;
|
||||
|
||||
if ( $toref ) {
|
||||
delete $toref->{references}{$name1} unless --$toref->{references}{$name1} > 0;
|
||||
delete $toref->{references}{$name1} if --$toref->{references}{$name1} <= 0;
|
||||
$toref->{references}{$name2}++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user