diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-10-19 13:59:28 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-10-19 13:59:28 (GMT) |
commit | f2c79b92f09fa796afe66d5886e678e9a7275ac1 (patch) | |
tree | 57711360e410906cba0d4df7f5db9525f2ec68bd /src/analysis/db/misc | |
parent | 0ecc100b14a4caae91698ad6b0ce42e8734126df (diff) |
Initialized exchange strings with a new function.
Diffstat (limited to 'src/analysis/db/misc')
-rw-r--r-- | src/analysis/db/misc/rlestr.h | 3 | ||||
-rw-r--r-- | src/analysis/db/misc/snapshot.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/analysis/db/misc/rlestr.h b/src/analysis/db/misc/rlestr.h index eb71582..709f9db 100644 --- a/src/analysis/db/misc/rlestr.h +++ b/src/analysis/db/misc/rlestr.h @@ -50,6 +50,9 @@ typedef struct _rle_string } rle_string; +#define setup_empty_rle_string(s) \ + init_static_rle_string(s, NULL); + /* Définit une représentation de chaîne de caractères. */ void init_dynamic_rle_string(rle_string *, char *); diff --git a/src/analysis/db/misc/snapshot.c b/src/analysis/db/misc/snapshot.c index 9aa096f..c441ead 100644 --- a/src/analysis/db/misc/snapshot.c +++ b/src/analysis/db/misc/snapshot.c @@ -427,7 +427,7 @@ bool unpack_snapshot_info(snapshot_info_t *info, packed_buffer *pbuf) if (result) { - init_static_rle_string(&string, NULL); + setup_empty_rle_string(&string); result = unpack_rle_string(&string, pbuf); @@ -442,7 +442,7 @@ bool unpack_snapshot_info(snapshot_info_t *info, packed_buffer *pbuf) if (result) { - init_static_rle_string(&string, NULL); + setup_empty_rle_string(&string); result = unpack_rle_string(&string, pbuf); |