-/*-
- * Copyright 2016 Vsevolod Stakhov
+/*
+ * Copyright 2024 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
guint flags;
} rspamd_stat_token_t;
+#define RSPAMD_TOKEN_VALUE_TYPE float
typedef struct token_node_s {
guint64 data;
guint window_idx;
guint flags;
rspamd_stat_token_t *t1;
rspamd_stat_token_t *t2;
- float values[];
+ RSPAMD_TOKEN_VALUE_TYPE values[0];
} rspamd_token_t;
struct rspamd_stat_ctx;
-/*-
- * Copyright 2016 Vsevolod Stakhov
+/*
+ * Copyright 2024 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
hashpipe[i].h = 0xfe;
hashpipe[i].t = NULL;
}
-
token_size = sizeof(rspamd_token_t) +
- sizeof(gdouble) * ctx->statfiles->len;
+ sizeof(RSPAMD_TOKEN_VALUE_TYPE) * ctx->statfiles->len;
g_assert(token_size > 0);
for (w = 0; w < words->len; w++) {