diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-03-22 11:20:05 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-03-22 11:20:05 +0000 |
commit | 015e2b575dc229d8c46a3cc4b3f1cf2fa5daffb4 (patch) | |
tree | bf75d570e1975967e5de9ac74cc45b3615ed7b82 | |
parent | 583f7dd2ce7679e5f377af4bc999d74c620466b8 (diff) |
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@
-rw-r--r-- | usr.bin/rsync/uploader.c | 7 |
1 files 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 <kristaps@bsd.lv> * Copyright (c) 2019 Florian Obser <florian@openbsd.org> @@ -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; |