Skip to content

Commit cc1260e

Browse files
committed
FFvaluestore: fix UB reported by clang
1 parent 92b1788 commit cc1260e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/util/FFvaluestore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <string.h>
44

5-
typedef char KeyType[33]; //32 byte key + \0
5+
typedef char KeyType[32]; //31 byte key + \0
66

77
void ffValuestoreInit(FFvaluestore* vs, uint32_t valueSize)
88
{

src/util/FFvaluestore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ typedef FFlist FFvaluestore;
1010

1111
void ffValuestoreInit(FFvaluestore* vs, uint32_t valueSize);
1212
FF_C_NODISCARD void* ffValuestoreGet(FFvaluestore* vs, const char* key);
13-
void* ffValuestoreSet(FFvaluestore* vs, const char* key, bool* created); //created may be NULL
13+
FF_C_NODISCARD void* ffValuestoreSet(FFvaluestore* vs, const char* key, bool* created); //created may be NULL
1414
void ffValuestoreDestroy(FFvaluestore* vs);
1515

1616
#endif

0 commit comments

Comments
 (0)