Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2013 03:38:17 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251363 - head/usr.sbin/bsdconfig/networking/share
Message-ID:  <201306040338.r543cHu7005612@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Tue Jun  4 03:38:16 2013
New Revision: 251363
URL: http://svnweb.freebsd.org/changeset/base/251363

Log:
  Use a case-statement instead of multiple (separate even) if-statements.

Modified:
  head/usr.sbin/bsdconfig/networking/share/media.subr

Modified: head/usr.sbin/bsdconfig/networking/share/media.subr
==============================================================================
--- head/usr.sbin/bsdconfig/networking/share/media.subr	Tue Jun  4 03:37:35 2013	(r251362)
+++ head/usr.sbin/bsdconfig/networking/share/media.subr	Tue Jun  4 03:38:16 2013	(r251363)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306040338.r543cHu7005612>