From owner-svn-src-all@FreeBSD.ORG Fri Oct 11 20:07:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1179D8C0; Fri, 11 Oct 2013 20:07:05 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2D312FA6; Fri, 11 Oct 2013 20:07:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9BK74Jd082843; Fri, 11 Oct 2013 20:07:04 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9BK74Pw082842; Fri, 11 Oct 2013 20:07:04 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201310112007.r9BK74Pw082842@svn.freebsd.org> From: Devin Teske Date: Fri, 11 Oct 2013 20:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256330 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Oct 2013 20:07:05 -0000 Author: dteske Date: Fri Oct 11 20:07:04 2013 New Revision: 256330 URL: http://svnweb.freebsd.org/changeset/base/256330 Log: Fix a bug that would occur in application death when debugging was enabled if you ended up in f_dialog_*_constrain() (indirectly, of course) with a purposefully-set NULL height, width, or rows parameter (because you didn't care to have that attribute calculated). Fix typo in a comment while here. Approved by: re (glebius) Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 11 19:43:37 2013 (r256329) +++ head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 11 20:07:04 2013 (r256330) @@ -415,8 +415,8 @@ f_dialog_size_constrain() if [ "$debug" ]; then # Print final constrained values to debugging - f_quietly f_getvar "$__var_height" - f_quietly f_getvar "$__var_width" + [ "$__var_height" ] && f_quietly f_getvar "$__var_height" + [ "$__var_width" ] && f_quietly f_getvar "$__var_width" fi return $__retval # success if no debug warnings were printed @@ -532,10 +532,10 @@ f_dialog_menu_constrain() fi if [ "$debug" ]; then - # Print final constrained values to debuggin - f_quietly f_getvar "$__var_height" - f_quietly f_getvar "$__var_width" - f_quietly f_getvar "$__var_rows" + # Print final constrained values to debugging + [ "$__var_height" ] && f_quietly f_getvar "$__var_height" + [ "$__var_width" ] && f_quietly f_getvar "$__var_width" + [ "$__var_rows" ] && f_quietly f_getvar "$__var_rows" fi return $__retval # success if no debug warnings were printed