X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcasereader.c;h=41d0ca473a8e52eb614fa1f72d0acc01a2ff49ac;hb=5204698c0d3a9bd3786d8bd19eba2a1ddbbb4311;hp=423a4dada271b432bef5ce8397f4f771b09e909a;hpb=cb0c5ca97866cea44dd5467bd630577e19f27707;p=pspp diff --git a/src/data/casereader.c b/src/data/casereader.c index 423a4dada2..41d0ca473a 100644 --- a/src/data/casereader.c +++ b/src/data/casereader.c @@ -1,4 +1,4 @@ -/* pspp - a program for statistical analysis. +/* PSPP - a program for statistical analysis. Copyright (C) 2007, 2009, 2010, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -107,7 +107,7 @@ casereader_clone (const struct casereader *reader_) { struct casereader *reader = CONST_CAST (struct casereader *, reader_); struct casereader *clone; - if ( reader == NULL ) + if ( reader == NULL ) return NULL; if (reader->class->clone == NULL) @@ -242,22 +242,10 @@ casereader_count_cases__ (const struct casereader *reader, struct casereader *clone; casenumber n_cases; - /* This seems to avoid a bug in Gcc 4.4.5 where, upon - return from this function, the stack appeared corrupt, - and the program returned to the wrong address. Oddly - the problem only manifested itself when used in conjunction - with the ODS reader, in code such as: - - GET DATA /TYPE=ODS .... - LIST. - */ -#if (__GNUC__ == 4 ) && (__GNUC_MINOR__ == 4) - volatile int x = 1; x++; -#endif - clone = casereader_clone (reader); n_cases = casereader_advance (clone, max_cases); casereader_destroy (clone); + return n_cases; }