Skip to content

Commit b8800aa

Browse files
Stephen HemmingerAl Viro
authored andcommitted
audit: make functions static
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 <shemminger@vyatta.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent d29be15 commit b8800aa

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

‎kernel/audit.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ int audit_send_list(void *_dest)
506506
}
507507

508508
struct sk_buff *audit_make_reply(int pid, int seq, int type, int done,
509-
int multi, void *payload, int size)
509+
int multi, const void *payload, int size)
510510
{
511511
struct sk_buff *skb;
512512
struct nlmsghdr *nlh;
@@ -555,8 +555,8 @@ static int audit_send_reply_thread(void *arg)
555555
* Allocates an skb, builds the netlink message, and sends it to the pid.
556556
* No failure notifications.
557557
*/
558-
void audit_send_reply(int pid, int seq, int type, int done, int multi,
559-
void *payload, int size)
558+
static void audit_send_reply(int pid, int seq, int type, int done, int multi,
559+
const void *payload, int size)
560560
{
561561
struct sk_buff *skb;
562562
struct task_struct *tsk;

‎kernel/audit.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ extern int audit_compare_dname_path(const char *dname, const char *path,
8484
int *dirlen);
8585
extern struct sk_buff * audit_make_reply(int pid, int seq, int type,
8686
int done, int multi,
87-
void *payload, int size);
88-
extern void audit_send_reply(int pid, int seq, int type,
89-
int done, int multi,
90-
void *payload, int size);
87+
const void *payload, int size);
9188
extern void audit_panic(const char *message);
9289

9390
struct audit_netlink_list {

‎kernel/audit_watch.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct audit_parent {
6060
};
6161

6262
/* fsnotify handle. */
63-
struct fsnotify_group *audit_watch_group;
63+
static struct fsnotify_group *audit_watch_group;
6464

6565
/* fsnotify events we care about. */
6666
#define AUDIT_FS_WATCH (FS_MOVE | FS_CREATE | FS_DELETE | FS_DELETE_SELF |\
@@ -123,7 +123,7 @@ void audit_put_watch(struct audit_watch *watch)
123123
}
124124
}
125125

126-
void audit_remove_watch(struct audit_watch *watch)
126+
static void audit_remove_watch(struct audit_watch *watch)
127127
{
128128
list_del(&watch->wlist);
129129
audit_put_parent(watch->parent);

0 commit comments

Comments
 (0)