From 2bf9c8c8fbf06cc203e06da01d91c275097afbc3 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 21 Jan 2026 17:32:39 +0000 Subject: [PATCH] persist-sqlite: Avoid array literal --- plugins/persist-sqlite/init.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/persist-sqlite/init.c b/plugins/persist-sqlite/init.c index 926738715..b53b90260 100644 --- a/plugins/persist-sqlite/init.c +++ b/plugins/persist-sqlite/init.c @@ -240,7 +240,9 @@ static int create_tables(struct mosquitto_sqlite *ms) if(rc){ goto fail; } - memcpy(db_schema_version, (int[3]){1, 0, 0}, sizeof(db_schema_version)); + db_schema_version[0] = 1; + db_schema_version[1] = 0; + db_schema_version[2] = 0; } if(db_schema_version[0] == 1){ /* 1.0.x needs to be upgraded to 1.1 */ @@ -249,7 +251,9 @@ static int create_tables(struct mosquitto_sqlite *ms) if(rc){ goto fail; } - memcpy(db_schema_version, (int[3]){1, 1, 0}, sizeof(db_schema_version)); + db_schema_version[0] = 1; + db_schema_version[1] = 1; + db_schema_version[2] = 0; } /* 1.1.x is the current DB-Schema version */ if(db_schema_version[1] == 1){