summaryrefslogtreecommitdiffstats
path: root/libdm/mm
diff options
context:
space:
mode:
Diffstat (limited to 'libdm/mm')
-rw-r--r--libdm/mm/pool-debug.c2
-rw-r--r--libdm/mm/pool.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libdm/mm/pool-debug.c b/libdm/mm/pool-debug.c
index 7cf2bac8..af1a912f 100644
--- a/libdm/mm/pool-debug.c
+++ b/libdm/mm/pool-debug.c
@@ -136,7 +136,7 @@ static struct block *_new_block(size_t s, unsigned alignment)
* I don't think LVM will use anything but default
* align.
*/
- assert(alignment == DEFAULT_ALIGNMENT);
+ assert(alignment <= DEFAULT_ALIGNMENT);
if (!b) {
log_error("Out of memory");
diff --git a/libdm/mm/pool.c b/libdm/mm/pool.c
index 825f7cad..608826b4 100644
--- a/libdm/mm/pool.c
+++ b/libdm/mm/pool.c
@@ -27,7 +27,7 @@ void dm_pools_check_leaks(void);
char *dm_pool_strdup(struct dm_pool *p, const char *str)
{
- char *ret = dm_pool_alloc(p, strlen(str) + 1);
+ char *ret = dm_pool_alloc_aligned(p, strlen(str) + 1, 2);
if (ret)
strcpy(ret, str);
@@ -37,7 +37,7 @@ char *dm_pool_strdup(struct dm_pool *p, const char *str)
char *dm_pool_strndup(struct dm_pool *p, const char *str, size_t n)
{
- char *ret = dm_pool_alloc(p, n + 1);
+ char *ret = dm_pool_alloc_aligned(p, n + 1, 2);
if (ret) {
strncpy(ret, str, n);