diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/map.c | 2 | ||||
-rw-r--r-- | src/util/map.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/util/map.c b/src/util/map.c index 35e1b49..cd2da42 100644 --- a/src/util/map.c +++ b/src/util/map.c @@ -25,8 +25,8 @@ struct map *open_map(const char *fname) { } struct map *res = calloc(1, sizeof(struct map)); - res->addr = addr; + res->end = addr + sb.st_size; res->sb = sb; res->fd = fd; return res; diff --git a/src/util/map.h b/src/util/map.h index 232720f..67beb9c 100644 --- a/src/util/map.h +++ b/src/util/map.h @@ -2,6 +2,7 @@ struct map { char *addr; + char *end; struct stat sb; int fd; }; |