From: Robert W. <ro...@us...> - 2005-08-30 16:58:10
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/madvise In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30355 Modified Files: madvise02.c Log Message: Applied patch from Suzuki K P: --- madvise02.c 2005-07-20 14:19:28.986166000 +0200 +++ madvise02.mod.c 2005-07-20 14:20:47.626166000 +0200 @@ -246,7 +246,7 @@ int main(int argc, char *argv[]) ptr_memory_allocated = (char *) malloc(5 * sizeof(pagesize)); /* Take temporary pointer for later freeing up the original one */ tmp_memory_allocated = ptr_memory_allocated; - tmp_memory_allocated = (char *)(((int) tmp_memory_allocated + pagesize-1) & ~(pagesize-1)); + tmp_memory_allocated = (char *)(((unsigned long) tmp_memory_allocated + pagesize-1) & ~(pagesize-1)); TEST(madvise(tmp_memory_allocated, 5 * pagesize, MADV_WILLNEED)); #endif Index: madvise02.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/madvise/madvise02.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** madvise02.c 23 Aug 2005 21:49:14 -0000 1.8 --- madvise02.c 30 Aug 2005 16:58:02 -0000 1.9 *************** *** 249,253 **** /* Take temporary pointer for later freeing up the original one */ tmp_memory_allocated = ptr_memory_allocated; ! tmp_memory_allocated = (char *)(((int) tmp_memory_allocated + pagesize-1) & ~(pagesize-1)); TEST(madvise(tmp_memory_allocated, 5 * pagesize, MADV_WILLNEED)); --- 249,253 ---- /* Take temporary pointer for later freeing up the original one */ tmp_memory_allocated = ptr_memory_allocated; ! tmp_memory_allocated = (char *)(((unsigned long) tmp_memory_allocated + pagesize-1) & ~(pagesize-1)); TEST(madvise(tmp_memory_allocated, 5 * pagesize, MADV_WILLNEED)); |