]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Simplify
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 20 Aug 2023 18:21:38 +0000 (19:21 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 20 Aug 2023 18:45:21 +0000 (19:45 +0100)
src/libserver/cfg_rcl.cxx

index e878c557fd723875aa3ac61a5e99798da1829eb0..310d89391acf1ca51c49ef64379b88950e65f155 100644 (file)
@@ -358,7 +358,6 @@ rspamd_rcl_group_handler(rspamd_mempool_t *pool, const ucl_object_t *obj,
                                                 struct rspamd_rcl_section *section, GError **err)
 {
        auto *cfg = static_cast<rspamd_config *>(ud);
-       const gchar *description = nullptr;
 
        g_assert(key != nullptr);
 
@@ -450,10 +449,8 @@ rspamd_rcl_group_handler(rspamd_mempool_t *pool, const ucl_object_t *obj,
 
 
        if (const auto *elt = ucl_object_lookup(obj, "description"); elt != nullptr) {
-               description = ucl_object_tostring(elt);
-
                gr->description = rspamd_mempool_strdup(cfg->cfg_pool,
-                                                                                               description);
+                                                                                               ucl_object_tostring(elt));
        }
 
        struct rspamd_rcl_symbol_data sd = {