summaryrefslogtreecommitdiff
path: root/src/common/szbin.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2025-02-08 15:57:23 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2025-02-08 15:57:23 (GMT)
commit71d0b80eca2fd2aed5883e2a6a57cb8c03aa27ff (patch)
tree74c9654c9c6d02059ba9aff4536ce0ea25e7763c /src/common/szbin.h
parentc928f8abb669d37e77bd9056240074941a945bb9 (diff)
Introduce a secure storage.
Diffstat (limited to 'src/common/szbin.h')
-rw-r--r--src/common/szbin.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/szbin.h b/src/common/szbin.h
index 5891449..23aac67 100644
--- a/src/common/szbin.h
+++ b/src/common/szbin.h
@@ -97,6 +97,16 @@ typedef struct _sized_binary_t
while (0)
+#define resize_sized_binary(sb, s) \
+ do \
+ { \
+ (sb)->size = s; \
+ (sb)->data = realloc((sb)->data, \
+ (sb)->size); \
+ } \
+ while (0)
+
+
#define add_to_sized_binary(sb, d, s) \
do \
{ \