Skip to content

Commit

Permalink
add_key: Solve toolchain, checkpatch.pl and sparse warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Aug 5, 2024
1 parent 07b2659 commit 7926cf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/add_key/add_key01.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static char *logon_buf, *logon_buf1;
static char *big_key_buf, *big_key_buf1;
static unsigned int logon_nsup, big_key_nsup;

struct tcase {
static struct tcase {
const char *type;
const char *desc;
char **buf;
Expand Down
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/add_key/add_key02.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "tst_test.h"
#include "lapi/keyctl.h"

struct tcase {
static struct tcase {
const char *type;
size_t plen;
} tcases[] = {
Expand Down
4 changes: 1 addition & 3 deletions testcases/kernel/syscalls/add_key/add_key05.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void verify_max_bytes(void)
static void verify_max_keys(void)
{
int i, used_key, max_key;
char desc[10];
char desc[15];

tst_res(TINFO, "test max keys under unprivileged user");
parse_proc_key_users(&used_key, &max_key, NULL, NULL);
Expand Down Expand Up @@ -203,8 +203,6 @@ static void do_test(unsigned int n)

tst_reap_children();
useri++;

return;
}

static void cleanup(void)
Expand Down

0 comments on commit 7926cf7

Please sign in to comment.