diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-02-13 15:04:24 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-02-13 15:04:24 +0000 |
commit | dca0a49e6d35f157e7ffdf8b0f3e61f707013e09 (patch) | |
tree | 59991c3201206adb2ea071697921d66a6b7b3b97 /src/libstat/stat_api.h | |
parent | 2cc55730c95794b427fd9fd9c1d9ad82e37b9696 (diff) | |
download | rspamd-dca0a49e6d35f157e7ffdf8b0f3e61f707013e09.tar.gz rspamd-dca0a49e6d35f157e7ffdf8b0f3e61f707013e09.zip |
[Fix] Make stat tokens allocation consistent
Diffstat (limited to 'src/libstat/stat_api.h')
-rw-r--r-- | src/libstat/stat_api.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstat/stat_api.h b/src/libstat/stat_api.h index 1badb2001..798d0b481 100644 --- a/src/libstat/stat_api.h +++ b/src/libstat/stat_api.h @@ -1,11 +1,11 @@ -/*- - * 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, @@ -53,13 +53,14 @@ typedef struct rspamd_stat_token_s { 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; |