Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sepolicy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
platform
system
sepolicy
Commits
610a4b1c
Commit
610a4b1c
authored
11 years ago
by
William Roberts
Browse files
Options
Downloads
Patches
Plain Diff
tools: update lengths from int to size_t
Change-Id: If4839218b200a0d90bdf7779d2e039719fae85a5
parent
61846291
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/check_seapp.c
+11
-11
11 additions, 11 deletions
tools/check_seapp.c
with
11 additions
and
11 deletions
tools/check_seapp.c
+
11
−
11
View file @
610a4b1c
...
...
@@ -101,7 +101,7 @@ struct kvp {
*/
struct
rule_map
{
char
*
key
;
/** key value before hashing */
in
t
length
;
/** length of the key map */
size_
t
length
;
/** length of the key map */
int
lineno
;
/** Line number rule was encounter on */
key_map
m
[];
/** key value mapping */
};
...
...
@@ -341,7 +341,7 @@ out:
*/
static
void
rule_map_print
(
FILE
*
fp
,
rule_map
*
r
)
{
in
t
i
;
size_
t
i
;
key_map
*
m
;
for
(
i
=
0
;
i
<
r
->
length
;
i
++
)
{
...
...
@@ -364,12 +364,12 @@ static void rule_map_print(FILE *fp, rule_map *r) {
*/
static
map_match
rule_map_cmp
(
rule_map
*
rmA
,
rule_map
*
rmB
)
{
in
t
i
;
in
t
j
;
size_
t
i
;
size_
t
j
;
int
inputs_found
=
0
;
int
num_of_matched_inputs
=
0
;
int
input_mode
=
0
;
in
t
matches
=
0
;
size_
t
matches
=
0
;
key_map
*
mA
;
key_map
*
mB
;
...
...
@@ -438,8 +438,8 @@ static map_match rule_map_cmp(rule_map *rmA, rule_map *rmB) {
*/
static
void
rule_map_free
(
rule_map
*
rm
,
rule_map_switch
s
)
{
in
t
i
;
in
t
len
=
rm
->
length
;
size_
t
i
;
size_
t
len
=
rm
->
length
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
key_map
*
m
=
&
(
rm
->
m
[
i
]);
free
(
m
->
data
);
...
...
@@ -472,7 +472,7 @@ static void free_kvp(kvp *k) {
*/
static
bool
rule_map_validate
(
const
rule_map
*
rm
)
{
in
t
i
;
size_
t
i
;
bool
found_name
=
false
;
bool
found_seinfo
=
false
;
char
*
name
=
NULL
;
...
...
@@ -511,9 +511,9 @@ static bool rule_map_validate(const rule_map *rm) {
* @return
* A rule map pointer.
*/
static
rule_map
*
rule_map_new
(
kvp
keys
[],
unsigned
in
t
num_of_keys
,
int
lineno
)
{
static
rule_map
*
rule_map_new
(
kvp
keys
[],
size_
t
num_of_keys
,
int
lineno
)
{
unsigned
in
t
i
=
0
,
j
=
0
;
size_
t
i
=
0
,
j
=
0
;
bool
valid_rule
;
rule_map
*
new_map
=
NULL
;
kvp
*
k
=
NULL
;
...
...
@@ -918,7 +918,7 @@ static void parse() {
char
*
p
,
*
name
=
NULL
,
*
value
=
NULL
,
*
saveptr
;
size_t
len
;
kvp
keys
[
KVP_NUM_OF_RULES
];
in
t
token_cnt
=
0
;
size_
t
token_cnt
=
0
;
while
(
fgets
(
line_buf
,
sizeof
line_buf
-
1
,
input_file
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment