From 9dbbf335fe3c6f3034f25ac947029ac2e802e366 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 18 May 2011 23:43:53 +0000 Subject: make file tests more compact --- perl-install/harddrake/sound.pm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'perl-install/harddrake') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 9ffaf0fe0..67b51d3e1 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -190,9 +190,7 @@ sub set_pulseaudio { my ($val) = @_; my $alterative = '/etc/sound/profiles/' . ($val ? 'pulse' : 'alsa'); - if ( ! -d $alterative ) { - return; - } + return if ! -d $alterative; common::symlinkf_update_alternatives('soundprofile', $alterative); @@ -221,9 +219,7 @@ sub is_pulseaudio_glitchfree_enabled() { sub set_pulseaudio_glitchfree { my ($val) = @_; - if ( ! -f $pa_startup_scriptfile ) { - return; - } + return if ! -f $pa_startup_scriptfile; substInFile { if ($val) { @@ -239,9 +235,7 @@ my $pa_client_conffile = "$::prefix/etc/pulse/client.conf"; sub set_PA_autospan { my ($val) = @_; - if ( ! -f $pa_client_conffile ) { - return; - } + return if ! -f $pa_client_conffile; $val = 'autospawn = ' . bool2yesno($val) . "\n"; my $done; -- cgit v1.2.1