--- cci/usr/src/etc/dump/dumptraverse.c 2019/07/28 12:24:19 1.1.1.1 +++ cci/usr/src/etc/dump/dumptraverse.c 2019/07/28 12:24:32 1.1.1.2 @@ -1,4 +1,12 @@ -static char *sccsid = "@(#)dumptraverse.c 1.15 (Berkeley) 9/25/83"; +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)dumptraverse.c 5.2 (Berkeley) 8/5/85"; +#endif not lint #include "dump.h" @@ -214,7 +222,7 @@ blksout(blkp, frags) bitmap(map, typ) char *map; { - register i, n; + register i; char *cp; spcl.c_type = typ; @@ -233,8 +241,11 @@ spclrec() spcl.c_checksum = 0; ip = (int *)&spcl; s = 0; - for(i = 0; i < sizeof(union u_spcl)/sizeof(int); i++) - s += *ip++; + i = sizeof(union u_spcl) / (4*sizeof(int)); + while (--i >= 0) { + s += *ip++; s += *ip++; + s += *ip++; s += *ip++; + } spcl.c_checksum = CHECKSUM - s; taprec((char *)&spcl); }