=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/indent/lexi.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/indent/lexi.c 2003/06/12 01:07:27 1.9 --- src/usr.bin/indent/lexi.c 2003/09/26 22:23:28 1.10 *************** *** 1,4 **** ! /* $OpenBSD: lexi.c,v 1.9 2003/06/12 01:07:27 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 --- 1,4 ---- ! /* $OpenBSD: lexi.c,v 1.10 2003/09/26 22:23:28 tedu Exp $ */ /* * Copyright (c) 1980, 1993 *************** *** 34,40 **** #ifndef lint /*static char sccsid[] = "@(#)lexi.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: lexi.c,v 1.9 2003/06/12 01:07:27 deraadt Exp $"; #endif /* not lint */ /* --- 34,40 ---- #ifndef lint /*static char sccsid[] = "@(#)lexi.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: lexi.c,v 1.10 2003/09/26 22:23:28 tedu Exp $"; #endif /* not lint */ /* *************** *** 589,598 **** err(1, NULL); memmove(specials, specialsinit, sizeof specialsinit); } else if (nspecials >= maxspecials) { ! maxspecials += maxspecials >> 2; ! specials = realloc(specials, maxspecials * sizeof specials[0]); ! if (specials == NULL) err(1, NULL); } p = &specials[i]; --- 589,602 ---- err(1, NULL); memmove(specials, specialsinit, sizeof specialsinit); } else if (nspecials >= maxspecials) { ! int newspecials = maxspecials + maxspecials >> 2; ! struct templ *specials2; ! ! specials2 = realloc(specials, newspecials * sizeof specials[0]); ! if (specials2 == NULL) err(1, NULL); + specials = specials2; + maxspecials = newspecials; } p = &specials[i];