summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-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 \
{ \