[nsd-users] remove unnecessary declarations
Jan Stary
hans at stare.cz
Thu Oct 20 20:11:59 UTC 2016
The following source files in the 4.1.3 tarball
declare extern int optind and extern char* optarg,
but those are already declared in the headers.
(Or is there a system where this is not the case?)
Jan
diff -Nup -Nupr /tmp/nsd-4.1.13/nsd-checkconf.c /home/hans/src/nsd-4.1.13/nsd-checkconf.c
--- /tmp/nsd-4.1.13/nsd-checkconf.c Fri Aug 5 16:04:30 2016
+++ /home/hans/src/nsd-4.1.13/nsd-checkconf.c Thu Oct 20 21:59:47 2016
@@ -18,9 +18,6 @@
#include "dname.h"
#include "rrl.h"
-extern char *optarg;
-extern int optind;
-
#define ZONE_GET_ACL(NAME, VAR, PATTERN) \
if (strcasecmp(#NAME, (VAR)) == 0) { \
quote_acl(PATTERN->NAME); \
diff -Nup -Nupr /tmp/nsd-4.1.13/nsd-checkzone.c /home/hans/src/nsd-4.1.13/nsd-checkzone.c
--- /tmp/nsd-4.1.13/nsd-checkzone.c Wed May 28 08:51:23 2014
+++ /home/hans/src/nsd-4.1.13/nsd-checkzone.c Thu Oct 20 22:00:24 2016
@@ -98,9 +98,6 @@ void sig_handler(int ATTR_UNUSED(sig))
{
}
-extern char *optarg;
-extern int optind;
-
int
main(int argc, char *argv[])
{
diff -Nup -Nupr /tmp/nsd-4.1.13/nsd-control.c /home/hans/src/nsd-4.1.13/nsd-control.c
--- /tmp/nsd-4.1.13/nsd-control.c Thu Sep 15 14:03:54 2016
+++ /home/hans/src/nsd-4.1.13/nsd-control.c Thu Oct 20 21:55:46 2016
@@ -350,11 +350,6 @@ go(const char* cfgfile, char* svr, int argc, char* arg
return ret;
}
-/** getopt global, in case header files fail to declare it. */
-extern int optind;
-/** getopt global, in case header files fail to declare it. */
-extern char* optarg;
-
/** Main routine for nsd-control */
int main(int argc, char* argv[])
{
diff -Nup -Nupr /tmp/nsd-4.1.13/nsd-mem.c /home/hans/src/nsd-4.1.13/nsd-mem.c
--- /tmp/nsd-4.1.13/nsd-mem.c Tue Aug 16 10:23:14 2016
+++ /home/hans/src/nsd-4.1.13/nsd-mem.c Thu Oct 20 22:02:52 2016
@@ -282,9 +282,6 @@ void sig_handler(int ATTR_UNUSED(sig))
{
}
-extern char *optarg;
-extern int optind;
-
int
main(int argc, char *argv[])
{
diff -Nup -Nupr /tmp/nsd-4.1.13/nsd.c /home/hans/src/nsd-4.1.13/nsd.c
--- /tmp/nsd-4.1.13/nsd.c Tue May 31 15:53:47 2016
+++ /home/hans/src/nsd-4.1.13/nsd.c Thu Oct 20 21:54:05 2016
@@ -411,9 +411,6 @@ bind8_stats (struct nsd *nsd)
}
#endif /* BIND8_STATS */
-extern char *optarg;
-extern int optind;
-
int
main(int argc, char *argv[])
{
More information about the nsd-users
mailing list