summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-10-19 13:59:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-10-19 13:59:28 (GMT)
commitf2c79b92f09fa796afe66d5886e678e9a7275ac1 (patch)
tree57711360e410906cba0d4df7f5db9525f2ec68bd /src
parent0ecc100b14a4caae91698ad6b0ce42e8734126df (diff)
Initialized exchange strings with a new function.
Diffstat (limited to 'src')
-rw-r--r--src/analysis/db/cdb.c2
-rw-r--r--src/analysis/db/client.c2
-rw-r--r--src/analysis/db/items/bookmark.c2
-rw-r--r--src/analysis/db/misc/rlestr.h3
-rw-r--r--src/analysis/db/misc/snapshot.c4
-rw-r--r--src/analysis/db/server.c2
6 files changed, 10 insertions, 5 deletions
diff --git a/src/analysis/db/cdb.c b/src/analysis/db/cdb.c
index 2df556b..d569719 100644
--- a/src/analysis/db/cdb.c
+++ b/src/analysis/db/cdb.c
@@ -199,6 +199,8 @@ static void g_cdb_archive_class_init(GCdbArchiveClass *klass)
static void g_cdb_archive_init(GCdbArchive *archive)
{
+ setup_empty_rle_string(&archive->hash);
+
archive->tmpdir = NULL;
archive->collections = create_collections_list();
diff --git a/src/analysis/db/client.c b/src/analysis/db/client.c
index 77dafea..15ec27f 100644
--- a/src/analysis/db/client.c
+++ b/src/analysis/db/client.c
@@ -169,7 +169,7 @@ static void g_hub_client_class_init(GHubClientClass *klass)
static void g_hub_client_init(GHubClient *client)
{
- init_static_rle_string(&client->hash, NULL);
+ setup_empty_rle_string(&client->hash);
client->collections = NULL;
client->working = NULL;
diff --git a/src/analysis/db/items/bookmark.c b/src/analysis/db/items/bookmark.c
index 65c948f..a7d2a53 100644
--- a/src/analysis/db/items/bookmark.c
+++ b/src/analysis/db/items/bookmark.c
@@ -209,7 +209,7 @@ static void g_db_bookmark_init(GDbBookmark *bookmark)
{
init_vmpa(&bookmark->addr, VMPA_NO_PHYSICAL, VMPA_NO_VIRTUAL);
- init_dynamic_rle_string(&bookmark->comment, NULL);
+ setup_empty_rle_string(&bookmark->comment);
}
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);
diff --git a/src/analysis/db/server.c b/src/analysis/db/server.c
index 6fae77e..6a2da65 100644
--- a/src/analysis/db/server.c
+++ b/src/analysis/db/server.c
@@ -781,7 +781,7 @@ static void *g_hub_server_listener(GHubServer *server)
/* Initialisation à vide pour les sorties en erreur */
- init_dynamic_rle_string(&hash, NULL);
+ setup_empty_rle_string(&hash);
/* Construction d'une représentation */