From owner-svn-src-stable-11@freebsd.org Thu Feb 1 21:04:11 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A491EC9316; Thu, 1 Feb 2018 21:04:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A98885EF5; Thu, 1 Feb 2018 21:04:11 +0000 (UTC) (envelope-from mav@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 415B1124DE; Thu, 1 Feb 2018 21:04:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w11L4Baj072792; Thu, 1 Feb 2018 21:04:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w11L4BFY072791; Thu, 1 Feb 2018 21:04:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201802012104.w11L4BFY072791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 1 Feb 2018 21:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328732 - stable/11/sbin/nvmecontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sbin/nvmecontrol X-SVN-Commit-Revision: 328732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 21:04:11 -0000 Author: mav Date: Thu Feb 1 21:04:10 2018 New Revision: 328732 URL: https://svnweb.freebsd.org/changeset/base/328732 Log: MFC r320522 (by imp): Fix sign of resid and add a mostly useless cast to cope with signed vs unsigned check warnings from traditional unix code construsts bogusly flagged as potentially unsafe. Modified: stable/11/sbin/nvmecontrol/wdc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/nvmecontrol/wdc.c ============================================================================== --- stable/11/sbin/nvmecontrol/wdc.c Thu Feb 1 19:57:21 2018 (r328731) +++ stable/11/sbin/nvmecontrol/wdc.c Thu Feb 1 21:04:10 2018 (r328732) @@ -105,7 +105,7 @@ wdc_do_dump(int fd, char *tmpl, const char *suffix, ui int fd2; uint8_t *buf; uint32_t len, offset; - ssize_t resid; + size_t resid; wdc_append_serial_name(fd, tmpl, MAXPATHLEN, suffix); @@ -142,7 +142,7 @@ wdc_do_dump(int fd, char *tmpl, const char *suffix, ui resid = len; first = 0; } - if (write(fd2, buf, resid) != resid) + if (write(fd2, buf, resid) != (ssize_t)resid) err(1, "write"); offset += resid; len -= resid;