Skip to content

Commit e6162e4

Browse files
committed
selinux: fix style issues in security/selinux/ss/constraint.h
As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore <[email protected]>
1 parent ade6a96 commit e6162e4

File tree

1 file changed

+34
-33
lines changed

1 file changed

+34
-33
lines changed

security/selinux/ss/constraint.h

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*
1414
* Author : Stephen Smalley, <[email protected]>
1515
*/
16+
1617
#ifndef _SS_CONSTRAINT_H_
1718
#define _SS_CONSTRAINT_H_
1819

@@ -21,43 +22,43 @@
2122
#define CEXPR_MAXDEPTH 5
2223

2324
struct constraint_expr {
24-
#define CEXPR_NOT 1 /* not expr */
25-
#define CEXPR_AND 2 /* expr and expr */
26-
#define CEXPR_OR 3 /* expr or expr */
27-
#define CEXPR_ATTR 4 /* attr op attr */
28-
#define CEXPR_NAMES 5 /* attr op names */
29-
u32 expr_type; /* expression type */
30-
31-
#define CEXPR_USER 1 /* user */
32-
#define CEXPR_ROLE 2 /* role */
33-
#define CEXPR_TYPE 4 /* type */
34-
#define CEXPR_TARGET 8 /* target if set, source otherwise */
35-
#define CEXPR_XTARGET 16 /* special 3rd target for validatetrans rule */
36-
#define CEXPR_L1L2 32 /* low level 1 vs. low level 2 */
37-
#define CEXPR_L1H2 64 /* low level 1 vs. high level 2 */
38-
#define CEXPR_H1L2 128 /* high level 1 vs. low level 2 */
39-
#define CEXPR_H1H2 256 /* high level 1 vs. high level 2 */
40-
#define CEXPR_L1H1 512 /* low level 1 vs. high level 1 */
41-
#define CEXPR_L2H2 1024 /* low level 2 vs. high level 2 */
42-
u32 attr; /* attribute */
43-
44-
#define CEXPR_EQ 1 /* == or eq */
45-
#define CEXPR_NEQ 2 /* != */
46-
#define CEXPR_DOM 3 /* dom */
47-
#define CEXPR_DOMBY 4 /* domby */
48-
#define CEXPR_INCOMP 5 /* incomp */
49-
u32 op; /* operator */
50-
51-
struct ebitmap names; /* names */
25+
#define CEXPR_NOT 1 /* not expr */
26+
#define CEXPR_AND 2 /* expr and expr */
27+
#define CEXPR_OR 3 /* expr or expr */
28+
#define CEXPR_ATTR 4 /* attr op attr */
29+
#define CEXPR_NAMES 5 /* attr op names */
30+
u32 expr_type; /* expression type */
31+
32+
#define CEXPR_USER 1 /* user */
33+
#define CEXPR_ROLE 2 /* role */
34+
#define CEXPR_TYPE 4 /* type */
35+
#define CEXPR_TARGET 8 /* target if set, source otherwise */
36+
#define CEXPR_XTARGET 16 /* special 3rd target for validatetrans rule */
37+
#define CEXPR_L1L2 32 /* low level 1 vs. low level 2 */
38+
#define CEXPR_L1H2 64 /* low level 1 vs. high level 2 */
39+
#define CEXPR_H1L2 128 /* high level 1 vs. low level 2 */
40+
#define CEXPR_H1H2 256 /* high level 1 vs. high level 2 */
41+
#define CEXPR_L1H1 512 /* low level 1 vs. high level 1 */
42+
#define CEXPR_L2H2 1024 /* low level 2 vs. high level 2 */
43+
u32 attr; /* attribute */
44+
45+
#define CEXPR_EQ 1 /* == or eq */
46+
#define CEXPR_NEQ 2 /* != */
47+
#define CEXPR_DOM 3 /* dom */
48+
#define CEXPR_DOMBY 4 /* domby */
49+
#define CEXPR_INCOMP 5 /* incomp */
50+
u32 op; /* operator */
51+
52+
struct ebitmap names; /* names */
5253
struct type_set *type_names;
5354

54-
struct constraint_expr *next; /* next expression */
55+
struct constraint_expr *next; /* next expression */
5556
};
5657

5758
struct constraint_node {
58-
u32 permissions; /* constrained permissions */
59-
struct constraint_expr *expr; /* constraint on permissions */
60-
struct constraint_node *next; /* next constraint */
59+
u32 permissions; /* constrained permissions */
60+
struct constraint_expr *expr; /* constraint on permissions */
61+
struct constraint_node *next; /* next constraint */
6162
};
6263

63-
#endif /* _SS_CONSTRAINT_H_ */
64+
#endif /* _SS_CONSTRAINT_H_ */

0 commit comments

Comments
 (0)