]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
remove duplicate #includes
authorDamien Miller <djm@mindrot.org>
Wed, 2 Oct 2019 00:54:28 +0000 (10:54 +1000)
committerDamien Miller <djm@mindrot.org>
Wed, 2 Oct 2019 00:54:28 +0000 (10:54 +1000)
Prompted by Jakub Jelen

14 files changed:
auth-bsdauth.c
auth-options.c
auth.h
auth2.c
dns.c
hmac.c
hostfile.c
kex.h
kexecdh.c
krl.c
mac.c
sandbox-systrace.c
ssh-keysign.c
sshconnect.c

index 4dc5045c2619357b787eb8ed8b26f6339033dee2..d124e994e776d4907a8742e33bb74aff8a250eb8 100644 (file)
@@ -29,8 +29,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-#include <stdarg.h>
-
 #ifdef BSD_AUTH
 #include "xmalloc.h"
 #include "sshkey.h"
index 9550f656f4275d8140ea1aacafeea43ef1617c02..90b0d7f25428c5d8f5a4c0007d94587c28d4d3fc 100644 (file)
@@ -22,7 +22,6 @@
 #include <stdlib.h>
 #include <netdb.h>
 #include <pwd.h>
-#include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdarg.h>
diff --git a/auth.h b/auth.h
index 04ad99ffb2affa61fdfb9ede5e049d90a921868f..becc672b53f25416ee3ebb0f49b3c9bca7bf0a7d 100644 (file)
--- a/auth.h
+++ b/auth.h
@@ -234,7 +234,7 @@ pid_t       subprocess(const char *, struct passwd *,
 int     sys_auth_passwd(struct ssh *, const char *);
 
 #if defined(KRB5) && !defined(HEIMDAL)
-#include <krb5.h>
 krb5_error_code ssh_krb5_cc_gen(krb5_context, krb5_ccache *);
 #endif
-#endif
+
+#endif /* AUTH_H */
diff --git a/auth2.c b/auth2.c
index 2143ff5dec7f779b8f46ae351f630f08dc1e501d..0e776224215d9f16990109334faffa1c6df3313a 100644 (file)
--- a/auth2.c
+++ b/auth2.c
 #include "auth.h"
 #include "dispatch.h"
 #include "pathnames.h"
-#include "sshbuf.h"
 #include "ssherr.h"
-
 #ifdef GSSAPI
 #include "ssh-gss.h"
 #endif
 #include "monitor_wrap.h"
-#include "ssherr.h"
 #include "digest.h"
 
 /* import */
diff --git a/dns.c b/dns.c
index ff1a2c41c29dd0ff02c62120502e169de1c50e06..e4f9bf8307e7b3d8d1d91d6ab1398f371ec93fcc 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -34,7 +34,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdarg.h>
 #include <stdlib.h>
 
 #include "xmalloc.h"
diff --git a/hmac.c b/hmac.c
index a79e8569c519fa32cbb3ad84bb0aa2b1d4949f58..32688876d3526c162f1c56af54d97f7e7e9f7592 100644 (file)
--- a/hmac.c
+++ b/hmac.c
@@ -21,7 +21,6 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <stdlib.h>
 
 #include "sshbuf.h"
 #include "digest.h"
index 389aae1fcb45862e49d9281d8c9f6345987edb11..96ab880d42cdaa13dc57c7c88293c34bef1a3399 100644 (file)
@@ -49,7 +49,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdarg.h>
 #include <unistd.h>
 
 #include "xmalloc.h"
diff --git a/kex.h b/kex.h
index 6465df88d07f034fc8840e618737ef60a287edb0..a5ae6ac050a78ba6dd159441cbb34f1d105fb0fe 100644 (file)
--- a/kex.h
+++ b/kex.h
@@ -30,6 +30,9 @@
 #include "crypto_api.h"
 
 #ifdef WITH_OPENSSL
+# include <openssl/bn.h>
+# include <openssl/dh.h>
+# include <openssl/ecdsa.h>
 # ifdef OPENSSL_HAS_ECC
 #  include <openssl/ec.h>
 # else /* OPENSSL_HAS_ECC */
 # define EC_POINT      void
 #endif /* WITH_OPENSSL */
 
-#ifdef WITH_OPENSSL
-#include <openssl/bn.h>
-#include <openssl/dh.h>
-#include <openssl/ec.h>
-#include <openssl/ecdsa.h>
-#else /* OPENSSL */
-#define BIGNUM         void
-#define DH             void
-#define EC_KEY         void
-#define EC_GROUP       void
-#endif /* WITH_OPENSSL */
-
 #define KEX_COOKIE_LEN 16
 
 #define        KEX_DH1                         "diffie-hellman-group1-sha1"
index be324a838ceb58a56b5c09ec7d0b07b5a4ba60d9..bcfa3b1071458253edf70ac1990c3738c3b8beef 100644 (file)
--- a/kexecdh.c
+++ b/kexecdh.c
@@ -211,11 +211,9 @@ kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob,
 
 #else
 
-#include <stdio.h>
-
-#include "sshkey.h"
-#include "kex.h"
-#include "ssherr.h"
+struct kex;
+struct sshbuf;
+struct sshkey;
 
 int
 kex_ecdh_keypair(struct kex *kex)
diff --git a/krl.c b/krl.c
index 10a8bcc8721beff806c39ac92a54ca13d279fd33..a7f6909556fe2c0513e4a16724286416bf28a9e6 100644 (file)
--- a/krl.c
+++ b/krl.c
@@ -29,7 +29,6 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
-#include <stdlib.h>
 
 #include "sshbuf.h"
 #include "ssherr.h"
diff --git a/mac.c b/mac.c
index de346ed203ea74e53da97097c1cb8906fca38530..f3dda66928668cc2df3544cd1b9f8d5915cc88b9 100644 (file)
--- a/mac.c
+++ b/mac.c
@@ -30,7 +30,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
-#include <stdlib.h>
 
 #include "digest.h"
 #include "hmac.h"
index add4c46d071ebaba951b32c354f769e7cd093a78..93e63b8e02a146dea1ec1886bc8ec8ad230755e1 100644 (file)
@@ -36,7 +36,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <limits.h>
 
 #include "atomicio.h"
 #include "log.h"
index 3ede407d38efe6a1b7a7e2f0926ff924a580ff78..6cfd5b46c7072c6fdcc37ffcfa3f90d3bc95ad4a 100644 (file)
@@ -33,7 +33,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
index bcb732a322c48796f17b4a5e129f2f483970dfe0..6230dad3247694f5dedb43fded7e4dd3c1eab182 100644 (file)
@@ -56,7 +56,6 @@
 #include "compat.h"
 #include "sshkey.h"
 #include "sshconnect.h"
-#include "hostfile.h"
 #include "log.h"
 #include "misc.h"
 #include "readconf.h"