summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-30 11:32:07 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-30 11:32:07 +0100
commitff463c609bd364a8090d89a52c4878fa1aef93bd (patch)
tree5ef217f37e5f082b1c3aa7537879f586465dec7a /src/lua
parent56583a05d4f391afc3a7bb1551be9724a6d7ba72 (diff)
downloadrspamd-ff463c609bd364a8090d89a52c4878fa1aef93bd.tar.gz
rspamd-ff463c609bd364a8090d89a52c4878fa1aef93bd.zip
Fix couple of compiler warnings
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_cfg_file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lua/lua_cfg_file.c b/src/lua/lua_cfg_file.c
index 0a63164f5..9df0a02ce 100644
--- a/src/lua/lua_cfg_file.c
+++ b/src/lua/lua_cfg_file.c
@@ -40,7 +40,7 @@ lua_process_metric (lua_State *L, const gchar *name, struct rspamd_config *cfg)
{
GList *metric_list;
gchar *symbol;
- const gchar *desc;
+ const gchar *desc = NULL;
struct metric *metric;
gdouble *score;
struct rspamd_symbol_def *s;
@@ -74,7 +74,6 @@ lua_process_metric (lua_State *L, const gchar *name, struct rspamd_config *cfg)
lua_gettable (L, -2);
if (lua_isstring (L, -1)) {
desc = lua_tostring (L, -1);
- s->description = rspamd_mempool_strdup (cfg->cfg_pool, desc);
}
lua_pop (L, 1);
}
@@ -103,6 +102,10 @@ lua_process_metric (lua_State *L, const gchar *name, struct rspamd_config *cfg)
g_hash_table_insert (metric->symbols, symbol, s);
}
+ if (desc) {
+ s->description = rspamd_mempool_strdup (cfg->cfg_pool, desc);
+ }
+
if ((metric_list =
g_hash_table_lookup (cfg->metrics_symbols, symbol)) == NULL) {
metric_list = g_list_prepend (NULL, metric);
44838/stable27 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/.scrutinizer.yml
blob: 784366e09f8231ab09914a073e469c1ee92799f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
before_commands:
  - 'git submodule update --init --recursive'

build:
    nodes:
        analysis:
            tests:
                override:
                    - php-scrutinizer-run

checks:
    php:
        excluded_dependencies:
            - etsy/phan

filter:
    excluded_paths:
        - '3rdparty/*'
        - 'apps/*/3rdparty/*'
        - 'apps/*/vendor/*'
        - 'l10n/*'
        - 'core/l10n/*'
        - 'apps/*/l10n/*'
        - 'apps/*/tests/*'
        - 'lib/l10n/*'
        - 'core/vendor/*'
        - 'core/js/tests/lib/*.js'
        - 'core/js/tests/specs/*.js'
        - 'core/js/jquery-showpassword.js'
        - 'core/js/jquery-tipsy.js'
        - 'core/js/placeholders.js'
        - 'settings/l10n/*'
        - 'tests/*'
        - 'build/*'
        - 'lib/composer/*'

imports:
    - javascript
    - php