projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34e95f1
)
pool: Support null 'pool' argument in pool_vasprintf().
author
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 11 Nov 2022 17:40:33 +0000
(09:40 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 17 Nov 2022 22:44:37 +0000
(14:44 -0800)
Other similar functions support a null 'pool', so this function should too.
src/libpspp/pool.c
patch
|
blob
|
history
diff --git
a/src/libpspp/pool.c
b/src/libpspp/pool.c
index 377ca9d853a44ca900e02da8bc1e1ac6da5cccab..a1979abc81b5d68b5916b56c590c6dcfd3f94580 100644
(file)
--- a/
src/libpspp/pool.c
+++ b/
src/libpspp/pool.c
@@
-395,6
+395,9
@@
pool_memdup0 (struct pool *pool, const char *string, size_t size)
char *
pool_vasprintf (struct pool *pool, const char *format, va_list args_)
{
+ if (!pool)
+ return xvasprintf (format, args_);
+
struct pool_block *b;
va_list args;
int needed, avail;