From ba3122bd8211dc1b3d9745d845c9d3cbfe5f5577 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Tue, 16 Sep 2014 13:51:19 -0500 Subject: [PATCH] Style cleanup * no more 'return ()' * Explicit 'return 0' --- plugins/virus/clamdscan | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/virus/clamdscan b/plugins/virus/clamdscan index 2b1cfc3..3fb220c 100644 --- a/plugins/virus/clamdscan +++ b/plugins/virus/clamdscan @@ -140,7 +140,7 @@ sub register { if ( ! defined $self->{_args}{deny_viruses} ) { $self->{_args}{deny_viruses} = 'yes'; } - if ( ! $self->{_args}{scan_all} ) { + if ( ! defined $self->{_args}{scan_all} ) { $self->{_args}{scan_all} = 1; } for my $setting (qw( deny_viruses defer_on_error scan_all )) { @@ -159,7 +159,7 @@ sub data_post_handler { if ($self->connection->notes('naughty')) { $self->log(LOGINFO, "skip, naughty"); - return (DECLINED); + return DECLINED; } return DECLINED if ! $self->should_scan($transaction); @@ -196,19 +196,19 @@ sub data_post_handler { $self->adjust_karma(-1); if ($self->{_args}{deny_viruses}) { - return (DENY, "Virus found: $found"); + return DENY, "Virus found: $found"; } $transaction->header->add('X-Virus-Found', 'Yes', 0); $transaction->header->add('X-Virus-Details', $found, 0); - return (DECLINED); + return DECLINED; } $self->log(LOGINFO, "pass, clean"); $transaction->header->add('X-Virus-Found', 'No', 0); $transaction->header->add('X-Virus-Checked', "by $version on " . $self->qp->config('me'), 0); - return (DECLINED); + return DECLINED; } sub assemble_message { @@ -226,9 +226,9 @@ sub err_and_return { if ($message) { $self->log(LOGERROR, $message); } - return (DENYSOFT, "Unable to scan for viruses") + return DENYSOFT, "Unable to scan for viruses" if $self->{_args}{defer_on_error}; - return (DECLINED, "skip"); + return DECLINED, "skip"; } sub get_filename { @@ -320,7 +320,7 @@ sub is_too_big { } $self->log(LOGDEBUG, "data_size, $size"); - return; + return 0; } sub is_not_multipart {