Added fh_free function.
[pspp] / src / moments.c
index 3890cbde441d83867c319c3b2a256c6a0bad274c..3c5e3840207b1f76d5bf15dbc5c5715c4221f9d2 100644 (file)
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 #include <config.h>
 #include "moments.h"
@@ -25,6 +25,9 @@
 #include "alloc.h"
 #include "misc.h"
 #include "val.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
 \f
 /* Calculates variance, skewness, and kurtosis into *VARIANCE,
    *SKEWNESS, and *KURTOSIS if they are non-null and not greater
@@ -520,8 +523,8 @@ read_values (double **values, double **weights, size_t *cnt)
       if (*cnt >= cap) 
         {
           cap = 2 * (cap + 8);
-          *values = xrealloc (*values, sizeof **values * cap);
-          *weights = xrealloc (*weights, sizeof **weights * cap);
+          *values = xnrealloc (*values, cap, sizeof **values);
+          *weights = xnrealloc (*weights, cap, sizeof **weights);
         }
 
       (*values)[*cnt] = value;