pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[formatting i18n 12/14] pool: Support NULL pool argument to pool_alloc_u


From: Ben Pfaff
Subject: [formatting i18n 12/14] pool: Support NULL pool argument to pool_alloc_unaligned().
Date: Sat, 19 Feb 2011 17:42:24 -0800

I don't see a reason that this should be unsupported.
---
 src/libpspp/pool.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/libpspp/pool.c b/src/libpspp/pool.c
index 7a8a591..7f3175d 100644
--- a/src/libpspp/pool.c
+++ b/src/libpspp/pool.c
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2000, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2010, 2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -299,7 +299,8 @@ pool_alloc (struct pool *pool, size_t amt)
 void *
 pool_alloc_unaligned (struct pool *pool, size_t amt)
 {
-  assert (pool != NULL);
+  if (pool == NULL)
+    return xmalloc (amt);
 
 #ifndef DISCRETE_BLOCKS
   /* Strings need not be aligned on any boundary, but some
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]