From: <mil...@us...> - 2008-03-03 21:06:25
|
Revision: 2829 http://selinux.svn.sourceforge.net/selinux/?rev=2829&view=rev Author: millertc Date: 2008-03-03 13:06:20 -0800 (Mon, 03 Mar 2008) Log Message: ----------- Author: Todd C. Miller <tm...@tr...> Date: Monday, March 03, 2008 1:21 PM Subject: PATH: minor checkpolicy cleanup Minor checkpolicy cleanup. Remove the unused DEBUG define, move handle_unknown to checkpolicy.c and checkmodule.c since it is not used in policy_parse.y. Also change COND_ERR to be (avrule_t *)-1 since that is guaranteed to not be a valid address. This is in preparation for a much larger diff. Signed-off-by: Todd C. Miller <tm...@tr...> Acked-by: Stephen Smalley <sd...@ty...> checkmodule.c | 2 +- checkpolicy.c | 2 +- policy_parse.y | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) Modified Paths: -------------- trunk/checkpolicy/checkmodule.c trunk/checkpolicy/checkpolicy.c trunk/checkpolicy/policy_parse.y Modified: trunk/checkpolicy/checkmodule.c =================================================================== --- trunk/checkpolicy/checkmodule.c 2008-02-29 06:46:18 UTC (rev 2828) +++ trunk/checkpolicy/checkmodule.c 2008-03-03 21:06:20 UTC (rev 2829) @@ -39,8 +39,8 @@ static sidtab_t sidtab; extern int mlspol; -extern int handle_unknown; +static int handle_unknown = SEPOL_DENY_UNKNOWN; static char *txtfile = "policy.conf"; static char *binfile = "policy"; Modified: trunk/checkpolicy/checkpolicy.c =================================================================== --- trunk/checkpolicy/checkpolicy.c 2008-02-29 06:46:18 UTC (rev 2828) +++ trunk/checkpolicy/checkpolicy.c 2008-03-03 21:06:20 UTC (rev 2829) @@ -90,8 +90,8 @@ extern policydb_t *policydbp; extern int mlspol; -extern int handle_unknown; +static int handle_unknown = SEPOL_DENY_UNKNOWN; static char *txtfile = "policy.conf"; static char *binfile = "policy"; Modified: trunk/checkpolicy/policy_parse.y =================================================================== --- trunk/checkpolicy/policy_parse.y 2008-02-29 06:46:18 UTC (rev 2828) +++ trunk/checkpolicy/policy_parse.y 2008-03-03 21:06:20 UTC (rev 2829) @@ -57,8 +57,7 @@ * when we have a parse error for a conditional rule. We can't check * for NULL (ie 0) because that is a potentially valid return. */ -static avrule_t *conditional_unused_error_code; -#define COND_ERR (avrule_t *)&conditional_unused_error_code +#define COND_ERR (avrule_t *)-1 #define TRUE 1 #define FALSE 0 @@ -68,7 +67,6 @@ static unsigned int pass; char *curfile = 0; int mlspol = 0; -int handle_unknown = 0; extern unsigned long policydb_lineno; extern unsigned long source_lineno; @@ -860,8 +858,6 @@ va_end(ap); } -#define DEBUG 1 - static int insert_separator(int push) { int error; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |