maint: Remove redundant 'environ' declarations.

* src/rexecd.c: Remove 'extern char **environ' and instead rely on the
gnulib declaration in unistd.h.
* src/rshd.c: Likewise.
* src/uucpd.c: Likewise.
* telnet/commands.c: Likewise.
* telnetd/pty.c: Likewise.
* tests/addrpeek.c: Likewise.
This commit is contained in:
Collin Funk
2024-05-02 04:21:40 -07:00
parent 7b3008c0d4
commit be9a0c66f5
6 changed files with 1 additions and 13 deletions

View File

@@ -216,7 +216,6 @@ char *envinit[] = { homedir, shell, path, username,
logname, remotehost, NULL
};
#endif
extern char **environ;
char *getstr (const char *);

View File

@@ -417,7 +417,6 @@ char rhost[128 + sizeof ("RHOST=")] = "RHOST=";
#ifndef WITH_PAM
char *envinit[] = { homedir, shell, path, logname, username, rhost, NULL };
#endif
extern char **environ;
void
doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)

View File

@@ -103,8 +103,6 @@ char *nenv[] = {
NULL,
};
extern char **environ;
static struct argp_option argp_options[] = {
#define GRP 10
{"uucico", 'u', "LOCATION", 0,

View File

@@ -58,6 +58,7 @@
#include <netinet/in.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <netdb.h>
@@ -1886,7 +1887,6 @@ env_find (const char *var)
void
env_init (void)
{
extern char **environ;
register char **epp, *cp;
register struct env_lst *ep;
#ifndef strchr

View File

@@ -83,7 +83,6 @@ startslave (char *host, int autologin, char *autoname)
return master;
}
extern char **environ;
/*
* scrub_env()
*

View File

@@ -56,13 +56,6 @@
# define SEPARATOR "\n"
#endif
/* TODO Develop some reliable test for the existence of ENVIRON.
* It is detectable using HAVE_DECL_ENVIRON for GNU/Linux and
* GNU/kFreeBSD. It is present, but not detectable for OpenBSD
* and FreeBSD.
*/
extern char **environ;
static void
write_address (int fd)
{