From owner-svn-src-head@freebsd.org Fri Feb 24 06:49:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29EB3CEB5C1; Fri, 24 Feb 2017 06:49:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF958254; Fri, 24 Feb 2017 06:49:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1O6nWLZ002923; Fri, 24 Feb 2017 06:49:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O6nWMh002922; Fri, 24 Feb 2017 06:49:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702240649.v1O6nWMh002922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 24 Feb 2017 06:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314191 - head/lib/libcam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2017 06:49:33 -0000 Author: ngie Date: Fri Feb 24 06:49:31 2017 New Revision: 314191 URL: https://svnweb.freebsd.org/changeset/base/314191 Log: Fix up r314189 The conditional in do_buff_decode(..) after the while loop was accidentally inverted. Only increment the pointer for fmt if it's not NUL. MFC after: 2 weeks X-MFC with: r314189 Reported by: pstef Sponsored by: Dell EMC Isilon Modified: head/lib/libcam/scsi_cmdparse.c Modified: head/lib/libcam/scsi_cmdparse.c ============================================================================== --- head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:28:58 2017 (r314190) +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:49:31 2017 (r314191) @@ -169,7 +169,7 @@ do_buff_decode(u_int8_t *buff, size_t le fmt++; } - if (*fmt == '\0') + if (*fmt != '\0') fmt++; /* Skip '}' */ field_name[i] = '\0'; break;