Author: royger Date: Mon Jul 30 11:15:20 2018 New Revision: 336895 URL: https://svnweb.freebsd.org/changeset/base/336895
Log: xen-blkfront: fix length check Length is an unsigned integer, so checking against < 0 doesn't make sense. While there also make clear that a length of 0 always succeeds. Submitted by: Pratyush Yadav <praty...@freebsd.org> Differential Review: https://reviews.freebsd.org/D16045 Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Mon Jul 30 10:55:02 2018 (r336894) +++ head/sys/dev/xen/blkfront/blkfront.c Mon Jul 30 11:15:20 2018 (r336895) @@ -602,8 +602,8 @@ xbd_dump(void *arg, void *virtual, vm_offset_t physica int sbp; int rc = 0; - if (length <= 0) - return (rc); + if (length == 0) + return (0); xbd_quiesce(sc); /* All quiet on the western front. */ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"