X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fpool.c;h=141d8ab40323b94fea587ce801369bde6938b7aa;hb=3f159627d3b80706e58a54be2431c3edbc5333dc;hp=213efb9ce7cea0aeaac971eea713b03f74a1ff98;hpb=c708736bdd0fea4b79f3ee4a10e00c3abb95d9e3;p=pspp diff --git a/src/libpspp/pool.c b/src/libpspp/pool.c index 213efb9ce7..141d8ab403 100644 --- a/src/libpspp/pool.c +++ b/src/libpspp/pool.c @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 2000 Free Software Foundation, Inc. - Written by Ben Pfaff . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -101,8 +100,8 @@ union align /* DISCRETE_BLOCKS may be declared as nonzero to prevent suballocation of blocks. This is useful under memory - debuggers like Checker or valgrind because it allows the - source location of bugs to be more accurately pinpointed. + debuggers like valgrind because it allows the source location + of bugs to be more accurately pinpointed. On the other hand, if we're testing the library, then we want to test the library's real functionality, not its crippled, slow, @@ -700,8 +699,8 @@ pool_fopen (struct pool *pool, const char *file_name, const char *mode) assert (pool && file_name && mode); f = fopen (file_name, mode); - if (f == NULL) - return NULL; + if (f != NULL) + pool_attach_file (pool, f); return f; }