summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-06-04 03:38:16 +0000
committerdteske <dteske@FreeBSD.org>2013-06-04 03:38:16 +0000
commit3f33ca83457c3011ee463ecd9a63ba4ccfec4ad5 (patch)
treeeb9bf7b11e6f7e6a7943bf49c89f85626c1865ac
parentec08ad3fe72f83b555c1133ba3ed82aacf4f5f00 (diff)
downloadFreeBSD-src-3f33ca83457c3011ee463ecd9a63ba4ccfec4ad5.zip
FreeBSD-src-3f33ca83457c3011ee463ecd9a63ba4ccfec4ad5.tar.gz
Use a case-statement instead of multiple (separate even) if-statements.
-rw-r--r--usr.sbin/bsdconfig/networking/share/media.subr11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/bsdconfig/networking/share/media.subr b/usr.sbin/bsdconfig/networking/share/media.subr
index a2bbdf7..8ae20e5 100644
--- a/usr.sbin/bsdconfig/networking/share/media.subr
+++ b/usr.sbin/bsdconfig/networking/share/media.subr
@@ -222,13 +222,16 @@ f_dialog_menu_media_options()
if [ $retval -eq $SUCCESS ]; then
options=$( eval f_dialog_menutag2item \"\$tag\" \
$supported_media )
- [ "$options" = "$opt_none" ] && options=
-
- if [ "$options" = "$opt_cust" ]; then
+ case "$options" in
+ "$opt_none")
+ options=
+ ;;
+ "$opt_cust")
options="$_options"
f_dialog_input_options "$interface"
retval=$?
- fi
+ ;;
+ esac
fi
return $retval
OpenPOWER on IntegriCloud