aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/linux
diff options
context:
space:
mode:
authorLee Roberts <lee.roberts@hpe.com>2018-03-07 19:47:00 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-09 19:43:48 +0000
commit45a09462ad4f64251d1302fb6fdca5cfef1d2f24 (patch)
tree6b8f41350025e194fc7591607cfc7c2091bfe1f7 /src/vppinfra/linux
parent0d2b0d5497b61afb5c964373c7bed974d78762a0 (diff)
Correct address calculation for VPP-1168
Use (u64) cast to ensure proper address calculations. Change-Id: I6bad50010b140189f1b0af177e55da0045bd7a93 Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
Diffstat (limited to 'src/vppinfra/linux')
-rw-r--r--src/vppinfra/linux/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index 75d2a7e0559..475e3dcd747 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -198,7 +198,7 @@ clib_mem_vm_ext_alloc (clib_mem_vm_alloc_t * a)
}
if (fd != -1)
- if ((ftruncate (fd, n_pages * (1 << log2_page_size))) == -1)
+ if ((ftruncate (fd, (u64) n_pages * (1 << log2_page_size))) == -1)
{
err = clib_error_return_unix (0, "ftruncate");
goto error;