summaryrefslogtreecommitdiff
path: root/libc/tests/grab.c
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1996-11-03 22:33:35 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:33:35 +0200
commitc218c617b5be443b7968308506969ad2b726d73c (patch)
tree0051f396af56133d24fcf2ab757fabc78c1a09bf /libc/tests/grab.c
parent0936b9aeab611665645a4e6bafaded7ca76dd189 (diff)
parent0d2fbe9b1bd284ce2cad55be17e8f2c896031a25 (diff)
downloaddev86-c218c617b5be443b7968308506969ad2b726d73c.tar.gz
Import Dev86src-0.0.8.tar.gzv0.0.8
Diffstat (limited to 'libc/tests/grab.c')
-rw-r--r--[-rwxr-xr-x]libc/tests/grab.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/tests/grab.c b/libc/tests/grab.c
index bd62a0f..b65fa28 100755..100644
--- a/libc/tests/grab.c
+++ b/libc/tests/grab.c
@@ -19,7 +19,7 @@ char ** argv;
struct s * ptr2;
struct s * ptr3;
int i,sz;
- long total = 0;
+ unsigned long total = 0;
for(i=0, sz=256 ; i<32; i++, sz = ((sz << 1) | (sz & V)) & M)
{
@@ -39,7 +39,7 @@ char ** argv;
ptr3->n = 0;
}
}
- for(sz>>=1; sz>255; )
+ for(sz>>=1; sz>3; )
{
ptr2 = (struct s *) malloc(sz-sizeof(int));
if(ptr2==0) { sz >>=1; continue; }
@@ -77,4 +77,5 @@ char ** argv;
printf("%2d(%8u)..%08lx..%ld\n",i++,sz,(long)ptr2,(long)ptr2);
}
while(ptr2 && i < 100);
+ exit(0);
}