-=| Raphael Geissert, Fri, May 29, 2009 at 06:14:12PM +0000 |=-
> The following commit has been merged in the master branch:
> commit 64b40be8fe2a36553a59f160955116ca17bfad38
> Author: Raphael Geissert <[email protected]>
> Date:   Fri May 29 13:14:51 2009 -0500
> 
>     Avoid code duplication for no reason
> 
> diff --git a/etc/acpi/actions/hotkey.sh b/etc/acpi/actions/hotkey.sh
> index 1db545c..6fc3f59 100755
> --- a/etc/acpi/actions/hotkey.sh
> +++ b/etc/acpi/actions/hotkey.sh
> @@ -135,7 +135,7 @@ case $code in
>  
>      # --/F7 - backlight off
>      00000016)
> -     if [ "${FnF_BACKLIGHTOFF:-handle_blank_screen}" != 'NONE' ]; then
> +     if [ "${FnF_BACKLIGHTOFF}" != 'NONE' ]; then
>           ${FnF_BACKLIGHTOFF:-handle_blank_screen}
>       fi
>       ;;
> ...

This is not code duplication, but protection agains undefined variable 
reference. The scripts run with "set -u".

Perhaps a simple ${FnF_BACKLIGHTOFF:-} could be used since the default 
is not important in the condition.

-- 
dam

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel

Reply via email to