X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Fparse.c;h=5c1e4632fd5105d50ea840d4fdb93381dc9f11ec;hb=9491a8bd354152d3a228e1bf041c7ad6228750d7;hp=07a56f8ef675ef5f7c3f7bdd0cbcc92949a535b9;hpb=35dac0a274893c6ba1d58d33a0889096eef033b4;p=pspp-builds.git diff --git a/src/language/expressions/parse.c b/src/language/expressions/parse.c index 07a56f8e..5c1e4632 100644 --- a/src/language/expressions/parse.c +++ b/src/language/expressions/parse.c @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000, 2006 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 @@ -1279,18 +1278,14 @@ parse_function (struct lexer *lexer, struct expression *e) n->composite.min_valid = min_valid != -1 ? min_valid : f->array_min_elems; if (n->type == OP_LAG_Vn || n->type == OP_LAG_Vs) - { - if (dataset_n_lag (e->ds) < 1) - dataset_set_n_lag (e->ds, 1); - } + dataset_need_lag (e->ds, 1); else if (n->type == OP_LAG_Vnn || n->type == OP_LAG_Vsn) { int n_before; assert (n->composite.arg_cnt == 2); assert (n->composite.args[1]->type == OP_pos_int); n_before = n->composite.args[1]->integer.i; - if ( dataset_n_lag (e->ds) < n_before) - dataset_set_n_lag (e->ds, n_before); + dataset_need_lag (e->ds, n_before); } free (args);