commit 6d1ccd4: [Minor] Remove unused function
Vsevolod Stakhov
vsevolod at rspamd.com
Thu Jun 16 12:42:03 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-06-16 13:40:47 +0100
URL: https://github.com/rspamd/rspamd/commit/6d1ccd4aeec5509c9be5d17da376aa3cbe282969 (HEAD -> master)
[Minor] Remove unused function
---
src/libutil/mem_pool.c | 17 -----------------
src/libutil/mem_pool.h | 13 -------------
2 files changed, 30 deletions(-)
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c
index d58be5e08..235fc8421 100644
--- a/src/libutil/mem_pool.c
+++ b/src/libutil/mem_pool.c
@@ -620,23 +620,6 @@ rspamd_mempool_strdup_ (rspamd_mempool_t * pool, const gchar *src, const gchar *
return newstr;
}
-gchar *
-rspamd_mempool_fstrdup_ (rspamd_mempool_t * pool, const struct f_str_s *src,
- const gchar *loc)
-{
- gchar *newstr;
-
- if (src == NULL) {
- return NULL;
- }
-
- newstr = rspamd_mempool_alloc_ (pool, src->len + 1, MIN_MEM_ALIGNMENT, loc);
- memcpy (newstr, src->str, src->len);
- newstr[src->len] = '\0';
-
- return newstr;
-}
-
gchar *
rspamd_mempool_ftokdup_ (rspamd_mempool_t *pool, const rspamd_ftok_t *src,
const gchar *loc)
diff --git a/src/libutil/mem_pool.h b/src/libutil/mem_pool.h
index 72eb1740d..986db9e00 100644
--- a/src/libutil/mem_pool.h
+++ b/src/libutil/mem_pool.h
@@ -217,19 +217,6 @@ gchar *rspamd_mempool_strdup_ (rspamd_mempool_t *pool, const gchar *src, const g
#define rspamd_mempool_strdup(pool, src) \
rspamd_mempool_strdup_ ((pool), (src), (G_STRLOC))
-/**
- * Make a copy of fixed string in pool as null terminated string
- * @param pool memory pool object
- * @param src source string
- * @return pointer to newly created string that is copy of src
- */
-gchar *rspamd_mempool_fstrdup_ (rspamd_mempool_t *pool,
- const struct f_str_s *src,
- const gchar *loc)
- RSPAMD_ATTR_ALLOC_ALIGN(MIN_MEM_ALIGNMENT);
-#define rspamd_mempool_fstrdup(pool, src) \
- rspamd_mempool_fstrdup_ ((pool), (src), G_STRLOC)
-
struct f_str_tok;
/**
More information about the Commits
mailing list