From 17d693db4d22e068259195b84508c0bed0356eec Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 22 Mar 2021 11:20:04 +0000 Subject: [PATCH] Put comment where it belongs also remove an assert() that checks for an impossible condition. The map argument is from a pread() call and can never be MAP_FAILED. From kristaps@ --- usr.bin/rsync/uploader.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/usr.bin/rsync/uploader.c b/usr.bin/rsync/uploader.c index 38d5d24fcc7..db8bc626ae2 100644 --- a/usr.bin/rsync/uploader.c +++ b/usr.bin/rsync/uploader.c @@ -1,4 +1,4 @@ -/* $Id: uploader.c,v 1.23 2019/08/26 22:22:14 benno Exp $ */ +/* $Id: uploader.c,v 1.24 2021/03/22 11:20:04 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * Copyright (c) 2019 Florian Obser @@ -150,11 +150,8 @@ init_blk(struct blk *p, const struct blkset *set, off_t offs, size_t idx, const void *map, const struct sess *sess) { - assert(map != MAP_FAILED); - - /* Block length inherits for all but the last. */ - p->idx = idx; + /* Block length inherits for all but the last. */ p->len = idx < set->blksz - 1 ? set->len : set->rem; p->offs = offs; -- 2.20.1