Skip to content

Commit ea56359

Browse files
committed
posix.cfg: Added nullPointer test for setkey()
1 parent 24a7114 commit ea56359

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/cfg/posix.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
//
99

1010
#include <aio.h>
11-
#include <stdlib.h>
1211
#include <stdio.h> // <- FILE
1312
#include <dirent.h>
1413
#include <sys/mman.h>
@@ -31,11 +30,18 @@
3130
#include <stdbool.h>
3231
#include <mqueue.h>
3332
#define _XOPEN_SOURCE
33+
#include <stdlib.h>
3434
#include <unistd.h>
3535
#include <wchar.h>
3636
#include <string.h>
3737
#include <strings.h>
3838

39+
void nullPointer_setkey(const char *key)
40+
{
41+
// cppcheck-suppress nullPointer
42+
setkey(NULL);
43+
}
44+
3945
void nullPointer_encrypt(char block[64], int edflag)
4046
{
4147
// cppcheck-suppress nullPointer

0 commit comments

Comments
 (0)