64-bit fix bug fix.
[rsc] --rw-rw-r-- M 845139 glenda sys 1437 Dec 6 11:04 sys/src/cmd/sam/list.c
/n/sourcesdump/2005/1206/plan9/sys/src/cmd/sam/list.c:16,22 -
/n/sourcesdump/2005/1207/plan9/sys/src/cmd/sam/list.c:16,22
else if(l->nused == l->nalloc){
p = erealloc(l->listptr, (l->nalloc+INCR)*esize);
l->listptr = p;
- memset(p+l->nalloc, 0, INCR*esize);
+ memset(p+l->nalloc*esize, 0, INCR*esize);
l->nalloc += INCR;
}
}
[rsc] --rw-rw-r-- M 845139 glenda sys 12016 Dec 6 11:05 sys/src/cmd/sam/sam.c
[rsc] --rw-rw-r-- M 845139 glenda sys 9366 Dec 6 11:04 sys/src/cmd/sam/sam.h
/n/sourcesdump/2005/1206/plan9/sys/src/cmd/sam/sam.h:66,77 -
/n/sourcesdump/2005/1207/plan9/sys/src/cmd/sam/sam.h:66,76
struct List
{
- int type;
+ int type; /* 'p' for pointer, 'P' for Posn */
int nalloc;
int nused;
union{
void* listp;
- Block* blkp;
void** voidp;
Posn* posnp;
String**stringp;
|