diff options
author | 2021-03-22 11:20:04 +0000 | |
---|---|---|
committer | 2021-03-22 11:20:04 +0000 | |
commit | 17d693db4d22e068259195b84508c0bed0356eec (patch) | |
tree | 1db572214cdfe8cce81b33c2eb340e1be3ed40c3 | |
parent | Compare explicitly against NULL. (diff) | |
download | wireguard-openbsd-17d693db4d22e068259195b84508c0bed0356eec.tar.xz wireguard-openbsd-17d693db4d22e068259195b84508c0bed0356eec.zip |
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; |