Skip to content

Commit e527ed7

Browse files
committed
Refactor: based: Clean up includes in based_remote.c
Using include-what-you-use. Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
1 parent 1c6dfc2 commit e527ed7

1 file changed

Lines changed: 29 additions & 30 deletions

File tree

daemons/based/based_remote.c

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2004-2025 the Pacemaker project contributors
2+
* Copyright 2004-2026 the Pacemaker project contributors
33
*
44
* The version control history for this file may have further details.
55
*
@@ -8,42 +8,41 @@
88
*/
99

1010
#include <crm_internal.h>
11-
#include <crm/crm.h>
1211

13-
#include <sys/param.h>
12+
#include <arpa/inet.h> // htons
13+
#include <errno.h> // errno, EAGAIN
14+
#include <grp.h> // getgrgid, getgrnam, group
15+
#include <inttypes.h> // PRIx64
16+
#include <netinet/in.h> // sockaddr_in, INADDR_ANY
1417
#include <stdbool.h>
15-
#include <stdio.h>
16-
#include <sys/types.h>
17-
#include <sys/stat.h>
18-
#include <unistd.h>
19-
#include <inttypes.h> // PRIx64
20-
#include <sys/socket.h>
21-
#include <arpa/inet.h>
22-
23-
#include <netinet/ip.h>
24-
25-
#include <stdlib.h>
26-
#include <errno.h>
27-
28-
#include <glib.h>
29-
#include <libxml/tree.h>
30-
31-
#include <crm/common/ipc.h>
32-
#include <crm/common/xml.h>
33-
#include <crm/cib/internal.h>
18+
#include <stddef.h> // NULL
19+
#include <stdlib.h> // calloc, free, getenv
20+
#include <string.h> // memset
21+
#include <sys/socket.h> // sockaddr{,_storage}, AF_INET, etc.
22+
#include <sys/types.h> // gid_t
23+
#include <unistd.h> // close
24+
25+
#include <glib.h> // gboolean, gpointer, g_source_remove, etc.
26+
#include <gnutls/gnutls.h> // gnutls_bye, gnutls_deinit
27+
#include <libxml/tree.h> // xmlNode
28+
#include <qb/qblog.h> // QB_XS
29+
30+
#include <crm_config.h> // CRM_DAEMON_GROUP
31+
#include <crm/common/internal.h> // pcmk__client_t, etc.
32+
#include <crm/common/logging.h> // CRM_CHECK
33+
#include <crm/common/mainloop.h> // mainloop_*
34+
#include <crm/common/results.h> // pcmk_rc_*
35+
#include <crm/common/xml.h> // PCMK_XA_*
36+
#include <crm/crm.h> // CRM_OP_REGISTER
3437

3538
#include "pacemaker-based.h"
3639

37-
#include <gnutls/gnutls.h>
38-
39-
#include <pwd.h>
40-
#include <grp.h>
4140
#if HAVE_SECURITY_PAM_APPL_H
42-
# include <security/pam_appl.h>
43-
# define HAVE_PAM 1
41+
#include <security/pam_appl.h> // pam_*, PAM_*
42+
#define HAVE_PAM 1
4443
#elif HAVE_PAM_PAM_APPL_H
45-
# include <pam/pam_appl.h>
46-
# define HAVE_PAM 1
44+
#include <pam/pam_appl.h> // pam_*, PAM_*
45+
#define HAVE_PAM 1
4746
#endif
4847

4948
static pcmk__tls_t *tls = NULL;

0 commit comments

Comments
 (0)