From 50cc1963f66dbfd388874775b99e604b1f7b35c5 Mon Sep 17 00:00:00 2001
From: MIZUTA Takeshi <mizuta.takeshi@fujitsu.com>
Date: Mon, 3 Feb 2020 18:46:20 +0900
Subject: [PATCH] Remove redundant header file inclusion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

There are some source code including the same header file redundantly.
We remove these redundant header file inclusion.

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
---
 src/monitor/monitor.c                      | 1 -
 src/providers/ipa/ipa_netgroups.c          | 1 -
 src/responder/common/cache_req/cache_req.c | 1 -
 src/responder/pam/pamsrv_cmd.c             | 1 -
 src/sss_client/sss_pac_responder_client.c  | 1 -
 src/tests/cmocka/test_negcache.c           | 1 -
 src/tools/sssctl/sssctl_logs.c             | 1 -
 src/util/usertools.c                       | 1 -
 8 files changed, 8 deletions(-)

diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index a97a528ae7..a1d366e5fb 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -31,7 +31,6 @@
 #ifdef HAVE_SYS_INOTIFY_H
 #include <sys/inotify.h>
 #endif
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
diff --git a/src/providers/ipa/ipa_netgroups.c b/src/providers/ipa/ipa_netgroups.c
index 944bb36c27..360c803ed5 100644
--- a/src/providers/ipa/ipa_netgroups.c
+++ b/src/providers/ipa/ipa_netgroups.c
@@ -26,7 +26,6 @@
 #include "db/sysdb.h"
 #include "providers/ldap/sdap_async_private.h"
 #include "providers/ipa/ipa_id.h"
-#include "db/sysdb.h"
 #include <ctype.h>
 
 #define ENTITY_NG 1
diff --git a/src/responder/common/cache_req/cache_req.c b/src/responder/common/cache_req/cache_req.c
index 303cee35b7..d2be34f9ad 100644
--- a/src/responder/common/cache_req/cache_req.c
+++ b/src/responder/common/cache_req/cache_req.c
@@ -26,7 +26,6 @@
 #include "util/util.h"
 #include "responder/common/responder.h"
 #include "responder/common/cache_req/cache_req_private.h"
-#include "responder/common/cache_req/cache_req_private.h"
 #include "responder/common/cache_req/cache_req_plugin.h"
 
 static const struct cache_req_plugin *
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 72412204b4..935d01e03b 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -32,7 +32,6 @@
 #include "responder/pam/pamsrv.h"
 #include "responder/pam/pam_helpers.h"
 #include "responder/common/cache_req/cache_req.h"
-#include "db/sysdb.h"
 
 enum pam_verbosity {
     PAM_VERBOSITY_NO_MESSAGES = 0,
diff --git a/src/sss_client/sss_pac_responder_client.c b/src/sss_client/sss_pac_responder_client.c
index 07d92315db..450e0884e3 100644
--- a/src/sss_client/sss_pac_responder_client.c
+++ b/src/sss_client/sss_pac_responder_client.c
@@ -24,7 +24,6 @@
 #include <sys/types.h>
 #include <errno.h>
 
-#include <unistd.h>
 #include <sys/syscall.h>
 
 #include "sss_client/sss_cli.h"
diff --git a/src/tests/cmocka/test_negcache.c b/src/tests/cmocka/test_negcache.c
index f8e4fc35ea..3ed1cb14af 100644
--- a/src/tests/cmocka/test_negcache.c
+++ b/src/tests/cmocka/test_negcache.c
@@ -38,7 +38,6 @@
 #include "util/util_sss_idmap.h"
 #include "lib/idmap/sss_idmap.h"
 #include "util/util.h"
-#include "util/util_sss_idmap.h"
 #include "db/sysdb_private.h"
 #include "responder/common/responder.h"
 #include "responder/common/negcache.h"
diff --git a/src/tools/sssctl/sssctl_logs.c b/src/tools/sssctl/sssctl_logs.c
index fc03f396c0..04a32bad85 100644
--- a/src/tools/sssctl/sssctl_logs.c
+++ b/src/tools/sssctl/sssctl_logs.c
@@ -31,7 +31,6 @@
 #include <ldb.h>
 #include <popt.h>
 #include <stdio.h>
-#include <signal.h>
 
 #include "util/util.h"
 #include "tools/common/sss_process.h"
diff --git a/src/util/usertools.c b/src/util/usertools.c
index 4753a89d49..eba83a4654 100644
--- a/src/util/usertools.c
+++ b/src/util/usertools.c
@@ -22,7 +22,6 @@
 #include <pwd.h>
 #include <errno.h>
 #include <talloc.h>
-#include <pwd.h>
 #include <grp.h>
 
 #include "db/sysdb.h"
-- 
2.23.0

