Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91709
b: refs/heads/master
c: eb5df9a
h: refs/heads/master
i:
  91707: da8c8b4
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Apr 21, 2008
1 parent d55fe3e commit dbe78c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c1c88ab8ad8d1f7db74f719f2649a070190fd5e
refs/heads/master: eb5df9a7ae794a7e352e0582011e9e2b586051b5
21 changes: 11 additions & 10 deletions trunk/security/selinux/ss/avtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

/* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com>
*
* Added conditional policy language extensions
* Added conditional policy language extensions
*
* Copyright (C) 2003 Tresys Technology, LLC
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2.
*
* Updated: Yuichi Nakamura <ynakam@hitachisoft.jp>
* Tuned number of hash slots for avtab to reduce memory usage
* Tuned number of hash slots for avtab to reduce memory usage
*/

#include <linux/kernel.h>
Expand All @@ -33,10 +33,10 @@ static inline int avtab_hash(struct avtab_key *keyp, u16 mask)

static struct avtab_node*
avtab_insert_node(struct avtab *h, int hvalue,
struct avtab_node * prev, struct avtab_node * cur,
struct avtab_node *prev, struct avtab_node *cur,
struct avtab_key *key, struct avtab_datum *datum)
{
struct avtab_node * newnode;
struct avtab_node *newnode;
newnode = kmem_cache_zalloc(avtab_node_cachep, GFP_KERNEL);
if (newnode == NULL)
return NULL;
Expand Down Expand Up @@ -84,7 +84,7 @@ static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_dat
}

newnode = avtab_insert_node(h, hvalue, prev, cur, key, datum);
if(!newnode)
if (!newnode)
return -ENOMEM;

return 0;
Expand All @@ -95,7 +95,7 @@ static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_dat
* It also returns a pointer to the node inserted.
*/
struct avtab_node *
avtab_insert_nonunique(struct avtab * h, struct avtab_key * key, struct avtab_datum * datum)
avtab_insert_nonunique(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum)
{
int hvalue;
struct avtab_node *prev, *cur, *newnode;
Expand Down Expand Up @@ -326,7 +326,7 @@ static uint16_t spec_order[] = {
};

int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol,
int (*insertf)(struct avtab *a, struct avtab_key *k,
int (*insertf)(struct avtab *a, struct avtab_key *k,
struct avtab_datum *d, void *p),
void *p)
{
Expand Down Expand Up @@ -398,7 +398,8 @@ int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol,
key.specified = spec_order[i] | enabled;
datum.data = le32_to_cpu(buf32[items++]);
rc = insertf(a, &key, &datum, p);
if (rc) return rc;
if (rc)
return rc;
}
}

Expand Down Expand Up @@ -513,5 +514,5 @@ void avtab_cache_init(void)

void avtab_cache_destroy(void)
{
kmem_cache_destroy (avtab_node_cachep);
kmem_cache_destroy(avtab_node_cachep);
}

0 comments on commit dbe78c0

Please sign in to comment.