projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DESCRIPTIVES: Fix a pair of memory leaks.
[pspp]
/
src
/
language
/
data-io
/
list.c
diff --git
a/src/language/data-io/list.c
b/src/language/data-io/list.c
index c7f85f3917d780f564a1060ce1f8d639aee77b37..e03bd08c126c903b5092a7c8aa1009d674613b3a 100644
(file)
--- a/
src/language/data-io/list.c
+++ b/
src/language/data-io/list.c
@@
-56,10
+56,10
@@
enum numbering
struct lst_cmd
{
struct lst_cmd
{
-
int
first;
-
int
last;
-
int
step;
- struct variable **v_variables;
+
long
first;
+
long
last;
+
long
step;
+
const
struct variable **v_variables;
size_t n_variables;
enum numbering numbering;
};
size_t n_variables;
enum numbering numbering;
};
@@
-162,7
+162,7
@@
cmd_list (struct lexer *lexer, struct dataset *ds)
if (lex_match_id (lexer, "VARIABLES") )
{
lex_match (lexer, T_EQUALS);
if (lex_match_id (lexer, "VARIABLES") )
{
lex_match (lexer, T_EQUALS);
- if (! parse_variables (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 ))
+ if (! parse_variables
_const
(lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 ))
{
msg (SE, _("No variables specified."));
return CMD_FAILURE;
{
msg (SE, _("No variables specified."));
return CMD_FAILURE;
@@
-193,7
+193,7
@@
cmd_list (struct lexer *lexer, struct dataset *ds)
if (lex_force_int (lexer))
{
if (lex_force_int (lexer))
{
-
lex_match_int (lexer, &cmd.first
);
+
cmd.first = lex_integer (lexer
);
lex_get (lexer);
}
lex_get (lexer);
}
@@
-213,7
+213,7
@@
cmd_list (struct lexer *lexer, struct dataset *ds)
lex_get (lexer);
}
}
lex_get (lexer);
}
}
- else if (! parse_variables (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 ))
+ else if (! parse_variables
_const
(lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 ))
{
return CMD_FAILURE;
}
{
return CMD_FAILURE;
}