libsepol: include header files in source files when matching declarations
It is good practise in C to include the header file that specifies the prototype of functions which are defined in the source file. Otherwise, the function prototypes which be different, which could cause unexpected issues. Add the include directives to do this. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
1f1fa9d47e
commit
1b36ace21b
9 changed files with 9 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <sepol/policydb/ebitmap.h>
|
||||
|
||||
#include "cil_internal.h"
|
||||
#include "cil_find.h"
|
||||
#include "cil_flavor.h"
|
||||
#include "cil_list.h"
|
||||
#include "cil_log.h"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cil_fqn.h"
|
||||
#include "cil_internal.h"
|
||||
#include "cil_log.h"
|
||||
#include "cil_strpool.h"
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "cil_log.h"
|
||||
#include "cil_mem.h"
|
||||
|
||||
void *cil_malloc(size_t size)
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "cil_mem.h"
|
||||
#include "cil_tree.h"
|
||||
#include "cil_lexer.h"
|
||||
#include "cil_parser.h"
|
||||
#include "cil_strpool.h"
|
||||
#include "cil_stack.h"
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "cil_flavor.h"
|
||||
#include "cil_find.h"
|
||||
#include "cil_mem.h"
|
||||
#include "cil_policy.h"
|
||||
#include "cil_tree.h"
|
||||
#include "cil_list.h"
|
||||
#include "cil_symtab.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "cil_internal.h"
|
||||
#include "cil_log.h"
|
||||
#include "cil_list.h"
|
||||
#include "cil_reset_ast.h"
|
||||
#include "cil_symtab.h"
|
||||
|
||||
static inline void cil_reset_classperms_list(struct cil_list *cp_list);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#define IPPROTO_SCTP 132
|
||||
#endif
|
||||
|
||||
#include <sepol/kernel_to_cil.h>
|
||||
#include <sepol/policydb/avtab.h>
|
||||
#include <sepol/policydb/conditional.h>
|
||||
#include <sepol/policydb/hashtab.h>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#define IPPROTO_SCTP 132
|
||||
#endif
|
||||
|
||||
#include <sepol/kernel_to_conf.h>
|
||||
#include <sepol/policydb/avtab.h>
|
||||
#include <sepol/policydb/conditional.h>
|
||||
#include <sepol/policydb/hashtab.h>
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include <sepol/policydb/services.h>
|
||||
#include <sepol/policydb/conditional.h>
|
||||
#include <sepol/policydb/util.h>
|
||||
#include <sepol/sepol.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "private.h"
|
||||
|
|
Loading…
Reference in a new issue