some minor corrections

This commit is contained in:
ceriel 1989-06-19 09:56:16 +00:00
parent 3824cfd66d
commit b11e382851
4 changed files with 5 additions and 5 deletions

View file

@ -225,9 +225,8 @@ _doprnt(fmt,ap,stream)
break;
#endif
case 'r':
ap = va_arg(ap, char *);
ap = va_arg(ap, va_list);
fmt = va_arg(ap, char *);
fmt=oldfmt;
continue;
}
#ifndef NOFLOAT

View file

@ -11,6 +11,6 @@ int getw(iop)
while (cnt--) {
*p++ = getc(iop);
}
if (foef(iop) || ferror(iop)) return EOF;
if (feof(iop) || ferror(iop)) return EOF;
return w;
}

View file

@ -5,4 +5,4 @@ sed "s/\.$VERSION/.$NEWVERSION/" < Version.c > tmp$$
mv tmp$$ Version.c
CM "$*"
V=`cat Version.c`
SV > ../versions/V`expr "$V" ':' '.*\([0-9][0-9]*\.[0-9][0-9]*\).*'`
SV > Versions/V`expr "$V" ':' '.*\([0-9][0-9]*\.[0-9][0-9]*\).*'`

View file

@ -584,11 +584,12 @@ ArraySizes(tp)
getbounds(index_type, &(tp->arr_low), &(tp->arr_high));
diff = tp->arr_high - tp->arr_low;
if (! fit(diff, (int) int_size)) {
if (diff < 0 || ! fit(diff, (int) int_size)) {
error("too many elements in array");
}
tp->tp_size = align((diff + 1) * tp->arr_elsize, tp->tp_align);
/* ??? check overflow ??? */
if (! ufit(tp->tp_size, (int) pointer_size)) {
error("array too large");
}