Minor fixes
authorChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Mon, 28 Oct 1991 07:59:26 +0000 (23:59 -0800)
committerChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Mon, 28 Oct 1991 07:59:26 +0000 (23:59 -0800)
SCCS-vsn: bin/csh/alloc.c 5.11

usr/src/bin/csh/alloc.c

index f189bf6..de6ec89 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)alloc.c    5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)alloc.c    5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -213,8 +213,6 @@ morecore(bucket)
     /* take 2k unless the block is bigger than that */
     rnu = (bucket <= 8) ? 11 : bucket + 3;
     nblks = 1 << (rnu - (bucket + 3)); /* how many blocks to get */
     /* take 2k unless the block is bigger than that */
     rnu = (bucket <= 8) ? 11 : bucket + 3;
     nblks = 1 << (rnu - (bucket + 3)); /* how many blocks to get */
-    if (rnu < bucket)
-       rnu = bucket;
     memtop = (char *) sbrk(1 << rnu);  /* PWP */
     op = (union overhead *) memtop;
     memtop += 1 << rnu;
     memtop = (char *) sbrk(1 << rnu);  /* PWP */
     op = (union overhead *) memtop;
     memtop += 1 << rnu;
@@ -238,6 +236,7 @@ morecore(bucket)
        op->ov_next = (union overhead *) (((caddr_t) op) + siz);
        op = (union overhead *) (((caddr_t) op) + siz);
     }
        op->ov_next = (union overhead *) (((caddr_t) op) + siz);
        op = (union overhead *) (((caddr_t) op) + siz);
     }
+    op->ov_next = NULL;
 }
 
 #endif
 }
 
 #endif