diff options
author | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-07-14 16:53:22 +0200 |
---|---|---|
committer | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-07-14 16:53:22 +0200 |
commit | 64ee4628e219ef3653d3555b94ba091d12e7bb39 (patch) | |
tree | c04204b95f7b4090bf693f6227b04ae4f586ddbd /src/util | |
parent | b245fc46be1d08ba17f411e924c26b72ee0e9cc9 (diff) |
toilet
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; }; |