projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix possible incorrect assertion when creating unique casereaders.
[pspp]
/
src
/
data
/
sys-file-reader.c
diff --git
a/src/data/sys-file-reader.c
b/src/data/sys-file-reader.c
index ec8ae3b32fd654c9f9ee0fcbbca007c0049fc075..f11480ac8f76c6bc2a3c72ac6a33519bbe971e48 100644
(file)
--- a/
src/data/sys-file-reader.c
+++ b/
src/data/sys-file-reader.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-2000, 2006-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2000, 2006-2007, 2009-2016
, 2021
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
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
@@
-995,7
+995,7
@@
read_header (struct sfm_reader *r, struct any_read_info *info,
r->compression = ANY_COMP_NONE;
else if (compressed == 1)
r->compression = ANY_COMP_SIMPLE;
r->compression = ANY_COMP_NONE;
else if (compressed == 1)
r->compression = ANY_COMP_SIMPLE;
- else
if (compressed != 0)
+ else
{
sys_error (r, 0, "System file header has invalid compression "
"value %d.", compressed);
{
sys_error (r, 0, "System file header has invalid compression "
"value %d.", compressed);
@@
-1999,7
+1999,7
@@
rename_var_and_save_short_names (struct sfm_reader *r, off_t pos,
for (i = 0; i < n_short_names; i++)
{
const char *s = var_get_short_name (var, i);
for (i = 0; i < n_short_names; i++)
{
const char *s = var_get_short_name (var, i);
- short_names[i] =
s != NULL ? xstrdup (s) : NULL
;
+ short_names[i] =
xstrdup_if_nonnull (s)
;
}
/* Set long name. */
}
/* Set long name. */
@@
-3244,12
+3244,13
@@
sys_msg (struct sfm_reader *r, off_t offset,
ds_put_format (&text, _("`%s': "), fh_get_file_name (r->fh));
ds_put_vformat (&text, format, args);
ds_put_format (&text, _("`%s': "), fh_get_file_name (r->fh));
ds_put_vformat (&text, format, args);
- struct msg m = {
+ struct msg *m = xmalloc (sizeof *m);
+ *m = (struct msg) {
.category = msg_class_to_category (class),
.severity = msg_class_to_severity (class),
.category = msg_class_to_category (class),
.severity = msg_class_to_severity (class),
- .text = ds_cstr (&text),
+ .text = ds_
steal_
cstr (&text),
};
};
- msg_emit (
&
m);
+ msg_emit (m);
}
/* Displays a warning for offset OFFSET in the file. */
}
/* Displays a warning for offset OFFSET in the file. */