projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get rid of our own int32 type in favor of the standard int32_t type.
[pspp]
/
src
/
data
/
any-writer.c
diff --git
a/src/data/any-writer.c
b/src/data/any-writer.c
index 93d2817019c2c0afd1bdc0fb3d78b6babc542f7c..9ee8af917e03cbdfd03f49642409a725addd5ae0 100644
(file)
--- a/
src/data/any-writer.c
+++ b/
src/data/any-writer.c
@@
-24,12
+24,12
@@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-#include
"message.h"
+#include
<libpspp/message.h>
#include "file-handle-def.h"
#include "filename.h"
#include "por-file-writer.h"
#include "sys-file-writer.h"
#include "file-handle-def.h"
#include "filename.h"
#include "por-file-writer.h"
#include "sys-file-writer.h"
-#include
"str.h"
+#include
<libpspp/str.h>
#include "scratch-writer.h"
#include "xalloc.h"
#include "scratch-writer.h"
#include "xalloc.h"
@@
-189,21
+189,29
@@
any_writer_error (const struct any_writer *writer)
bool
any_writer_close (struct any_writer *writer)
{
bool
any_writer_close (struct any_writer *writer)
{
+ bool ok;
+
if (writer == NULL)
return true;
switch (writer->type)
{
case SYSTEM_FILE:
if (writer == NULL)
return true;
switch (writer->type)
{
case SYSTEM_FILE:
- return sfm_close_writer (writer->private);
+ ok = sfm_close_writer (writer->private);
+ break;
case PORTABLE_FILE:
case PORTABLE_FILE:
- return pfm_close_writer (writer->private);
+ ok = pfm_close_writer (writer->private);
+ break;
case SCRATCH_FILE:
case SCRATCH_FILE:
- return scratch_writer_close (writer->private);
-
+ ok = scratch_writer_close (writer->private);
+ break;
+
default:
abort ();
}
default:
abort ();
}
+
+ free (writer);
+ return ok;
}
}