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:
Tom Eastep 2017-08-19 12:22:18 -07:00
parent 390ac30be8
commit 419ff8903b
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -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}++;
}
}