Skip to content
Snippets Groups Projects
Commit 335b48a5 authored by Roman Tokarev's avatar Roman Tokarev
Browse files

Additional changes for commit f5c4069d.

parent f5c4069d
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@
#include <tbuf.h>
#include <stat.h>
#define PALLOC_POOL_NAME_MAXLEN 16
struct chunk {
uint32_t magic;
void *brk;
......@@ -66,7 +68,7 @@ struct palloc_pool {
struct chunk_list_head chunks;
SLIST_ENTRY(palloc_pool) link;
size_t allocated;
char name[16];
char name[PALLOC_POOL_NAME_MAXLEN];
};
SLIST_HEAD(palloc_pool_head, palloc_pool) pools;
......@@ -371,8 +373,7 @@ palloc_stat(struct tbuf *buf)
void
palloc_set_name(struct palloc_pool *pool, const char *name)
{
if (name == NULL)
name = "undefined";
assert(name != NULL);
snprintf(pool->name, sizeof(pool->name), "%s", name);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment