diff options
author | dteske <dteske@FreeBSD.org> | 2013-06-20 05:48:08 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-06-20 05:48:08 +0000 |
commit | 1a1d811a616414b6c513fdaec7249b7037a7cac4 (patch) | |
tree | 42ad8171e52871433358a5a88976ed211469abf8 /usr.sbin/bsdconfig/usermgmt/useredit | |
parent | 8fb422656d21d27cca45cc9aa25bf8bb8a0ea2ea (diff) | |
download | FreeBSD-src-1a1d811a616414b6c513fdaec7249b7037a7cac4.zip FreeBSD-src-1a1d811a616414b6c513fdaec7249b7037a7cac4.tar.gz |
When the fall-back of a case-statement is the last thing executed in a
while-loop _and_ all prior matches in the same case-statement either break
or continue, we can safely break the fall-back out of the case-statement.
This should improve readability and allow for longer-lines by reducing the
level of indentation by-one for the fall-back case.
Diffstat (limited to 'usr.sbin/bsdconfig/usermgmt/useredit')
-rwxr-xr-x | usr.sbin/bsdconfig/usermgmt/useredit | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/bsdconfig/usermgmt/useredit b/usr.sbin/bsdconfig/usermgmt/useredit index 0e8fd12..e34fd2e 100755 --- a/usr.sbin/bsdconfig/usermgmt/useredit +++ b/usr.sbin/bsdconfig/usermgmt/useredit @@ -77,13 +77,12 @@ while :; do [ $retval -eq 0 ] || f_die - case "$mtag" in - "X $msg_exit") break ;; - *) # anything else is a userid - $BSDCFG_LIBE/$APP_DIR/userinput \ - ${USE_XDIALOG:+-X} mode="Edit/View" user="$mtag" - ;; - esac + [ "$mtag" = "X $msg_exit" ] && break + + # Anything else is a userid + + $BSDCFG_LIBE/$APP_DIR/userinput \ + ${USE_XDIALOG:+-X} mode="Edit/View" user="$mtag" done exit $SUCCESS |