Skip to content

Commit

Permalink
audit: make functions static
Browse files Browse the repository at this point in the history
I was doing some namespace checks and found some simple stuff in
audit that could be cleaned up. Make some functions static, and
put const on make_reply payload arg.

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Stephen Hemminger authored and Al Viro committed Oct 30, 2010
1 parent d29be15 commit b8800aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ int audit_send_list(void *_dest)
}

struct sk_buff *audit_make_reply(int pid, int seq, int type, int done,
int multi, void *payload, int size)
int multi, const void *payload, int size)
{
struct sk_buff *skb;
struct nlmsghdr *nlh;
Expand Down Expand Up @@ -555,8 +555,8 @@ static int audit_send_reply_thread(void *arg)
* Allocates an skb, builds the netlink message, and sends it to the pid.
* No failure notifications.
*/
void audit_send_reply(int pid, int seq, int type, int done, int multi,
void *payload, int size)
static void audit_send_reply(int pid, int seq, int type, int done, int multi,
const void *payload, int size)
{
struct sk_buff *skb;
struct task_struct *tsk;
Expand Down
5 changes: 1 addition & 4 deletions kernel/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ extern int audit_compare_dname_path(const char *dname, const char *path,
int *dirlen);
extern struct sk_buff * audit_make_reply(int pid, int seq, int type,
int done, int multi,
void *payload, int size);
extern void audit_send_reply(int pid, int seq, int type,
int done, int multi,
void *payload, int size);
const void *payload, int size);
extern void audit_panic(const char *message);

struct audit_netlink_list {
Expand Down
4 changes: 2 additions & 2 deletions kernel/audit_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct audit_parent {
};

/* fsnotify handle. */
struct fsnotify_group *audit_watch_group;
static struct fsnotify_group *audit_watch_group;

/* fsnotify events we care about. */
#define AUDIT_FS_WATCH (FS_MOVE | FS_CREATE | FS_DELETE | FS_DELETE_SELF |\
Expand Down Expand Up @@ -123,7 +123,7 @@ void audit_put_watch(struct audit_watch *watch)
}
}

void audit_remove_watch(struct audit_watch *watch)
static void audit_remove_watch(struct audit_watch *watch)
{
list_del(&watch->wlist);
audit_put_parent(watch->parent);
Expand Down

0 comments on commit b8800aa

Please sign in to comment.