Put klen' and
newk' back in local block so that their scope is limited.
(Reduces 1.31 to a one-line diff from 1.30.)
This commit is contained in:
parent
b255c47737
commit
c8e92c46c8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.31 2002/03/04 13:16:03 lukem Exp $ */
|
||||
/* $NetBSD: main.c,v 1.32 2002/03/05 15:37:35 tv Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.51 2001/10/06 10:52:25 espie Exp $ */
|
||||
|
||||
/*-
|
||||
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.31 2002/03/04 13:16:03 lukem Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.32 2002/03/05 15:37:35 tv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -561,16 +561,17 @@ inspect(c, tp)
|
||||
static void
|
||||
initkwds()
|
||||
{
|
||||
size_t i, klen;
|
||||
size_t i;
|
||||
unsigned int h;
|
||||
ndptr p;
|
||||
char *k, *newk;
|
||||
char *k;
|
||||
|
||||
for (i = 0; i < MAXKEYS; i++) {
|
||||
k = (char *)keywrds[i].knam;
|
||||
if (m4prefix) {
|
||||
klen = strlen(k) + 4;
|
||||
newk = malloc(klen);
|
||||
size_t klen = strlen(k);
|
||||
char *newk = malloc(klen + 4);
|
||||
|
||||
if (snprintf(newk, klen, "m4_%s", k) == -1)
|
||||
err(1, "snprintf");
|
||||
keywrds[i].knam = newk;
|
||||
|
Loading…
Reference in New Issue
Block a user