src/math/categoricals.c: Remove inappropriate const qualifier
[pspp] / src / math / percentiles.c
index c76bb492ba767a90ffa2c03c8d35bf8a7d532ab6..2063dd2c6549a2fe3c5cc06039a4986d0a1f86c8 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2011 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
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
-#include "percentiles.h"
-#include <math/order-stats.h>
 
+#include "math/percentiles.h"
+
+#include "data/casereader.h"
+#include "data/val-type.h"
+#include "data/variable.h"
+#include "libpspp/assertion.h"
+#include "libpspp/cast.h"
+#include "math/order-stats.h"
+
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-#include <libpspp/assertion.h>
-#include <libpspp/cast.h>
-#include <data/val-type.h>
-#include <gl/xalloc.h>
-#include <data/variable.h>
-#include <data/casereader.h>
-
-
 const char *const ptile_alg_desc[] = {
   "",
   N_("HAverage"),
@@ -176,7 +176,7 @@ percentile_create (double p, double W)
   ptl->w = W;
 
   os->n_k = 2;
-  os->k = xcalloc (sizeof (*os->k), 2);
+  os->k = xcalloc (2, sizeof (*os->k));
   os->k[0].tc = W * p;
   os->k[1].tc = (W + 1.0) * p;