Declare variable only once. Fixes PR 44795.
This commit is contained in:
parent
17ab36f183
commit
18e7170716
|
@ -1,15 +1,15 @@
|
|||
/* $NetBSD: util.c,v 1.50 2010/06/03 15:40:16 sjg Exp $ */
|
||||
/* $NetBSD: util.c,v 1.51 2011/04/02 07:58:30 mbalmer Exp $ */
|
||||
|
||||
/*
|
||||
* Missing stuff from OS's
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: util.c,v 1.50 2010/06/03 15:40:16 sjg Exp $";
|
||||
static char rcsid[] = "$NetBSD: util.c,v 1.51 2011/04/02 07:58:30 mbalmer Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: util.c,v 1.50 2010/06/03 15:40:16 sjg Exp $");
|
||||
__RCSID("$NetBSD: util.c,v 1.51 2011/04/02 07:58:30 mbalmer Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -49,7 +49,7 @@ findenv(const char *name, int *offset)
|
|||
char *p, *q;
|
||||
|
||||
for (i = 0; (q = environ[i]); i++) {
|
||||
char *p = strchr(q, '=');
|
||||
p = strchr(q, '=');
|
||||
if (p == NULL)
|
||||
continue;
|
||||
if (strncmp(name, q, len = p - q) == 0) {
|
||||
|
|
Loading…
Reference in New Issue