X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/94ed11aed11d6eae5797205bd808efddd32778e7..28e7683d83570df1fc6b44a74e8eb0782b8bd9a2:/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp

diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp
index 519074b1..47999efc 100644
--- a/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp
+++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp
@@ -954,26 +954,22 @@ if (PQresultStatus(result) != PGRES_TUPLES_OK)
 
 tuples = PQntuples(result);
 
-conf->ips.Erase();
+USER_IPS ips;
 for (int i = 0; i < tuples; ++i)
     {
-    IP_MASK ipm;
+    IP_MASK im;
 
-    int ip, mask;
+    im.ip = inet_strington(PQgetvalue(result, i, 0));
 
-    ip = inet_strington(PQgetvalue(result, i, 0));
-
-    if (str2x(PQgetvalue(result, i, 1), mask))
+    if (str2x(PQgetvalue(result, i, 1), im.mask))
         {
         printfd(__FILE__, "POSTGRESQL_STORE::RestoreUserConf(): 'Failed to fetch mask'\n");
         continue;
         }
 
-    ipm.ip = ip;
-    ipm.mask = mask;
-
-    conf->ips.Add(ipm);
+    ips.Add(im);
     }
+conf->ips = ips;
 
 PQclear(result);