diff options
author | Ladar Levison <ladar@lavabit.com> | 2019-02-27 19:14:24 +0300 |
---|---|---|
committer | Ladar Levison <ladar@users.noreply.github.com> | 2019-03-07 00:09:38 +0300 |
commit | 09d0dd605143ce22196b60799133acdea881c744 (patch) | |
tree | 155085a444cb7170e76b6fc17d6db4af63ab9d73 /src | |
parent | 42b5e10c1e97253e378bb4eee929d078c77b5101 (diff) |
Fixing printf syntax for unsigned long long.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/strings/allocation.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/strings/allocation.c b/src/core/strings/allocation.c index 3facc8c7..1cf65356 100644 --- a/src/core/strings/allocation.c +++ b/src/core/strings/allocation.c @@ -780,12 +780,14 @@ stringer_t * st_realloc(stringer_t *s, size_t len) { log_pedantic("An error occurred while resizing a memory mapped buffer. { error = %s }", errno_string(errno, MEMORYBUF(1024), 1024)); } #else + uint64_t cur = 0; struct rlimit64 limits = { 0, 0 }; getrlimit64(RLIMIT_MEMLOCK, &limits); if ((((mapped_t *)s)->opts & SECURE) && errno == EAGAIN && (limits.rlim_cur < len || limits.rlim_cur < (len + CORE_SECURE_MEMORY_LENGTH))) { + cur = (uint64_t)limits.rlim_cur; log_pedantic("Unable to resize the secure memory mapped buffer, the requested size exceeds the system limit for locked pages. " \ - "{ limit = %lu / requested = %zu }", limits.rlim_cur, len); + "{ limit = %lu / requested = %zu }", cur, len); } else { log_pedantic("An error occurred while resizing a memory mapped buffer. { error = %s }", errno_string(errno, MEMORYBUF(1024), 1024)); |