]> git.ozlabs.org Git - ccan/blobdiff - ccan/asort/asort.c
asort: Remove constness from ctx pointer.
[ccan] / ccan / asort / asort.c
index ce12fe660eb9146299fcf0c53937d381bdac055f..9f5868619095b354c28da27d3e6efd18557790ba 100644 (file)
@@ -3,8 +3,8 @@
 
 #if HAVE_NESTED_FUNCTIONS
 void _asort(void *base, size_t nmemb, size_t size,
-           int(*compar)(const void *, const void *, const void *ctx),
-           const void *ctx)
+           int(*compar)(const void *, const void *, void *ctx),
+           void *ctx)
 {
        /* This gives bogus "warning: no previous prototype for ‘cmp’"
         * with gcc 4 with -Wmissing-prototypes.  Hence the auto crap. */
@@ -107,8 +107,8 @@ typedef struct
 
 void
 _asort (void *const pbase, size_t total_elems, size_t size,
-       int(*cmp)(const void *, const void *, const void *arg),
-       const void *arg)
+       int(*cmp)(const void *, const void *, void *arg),
+       void *arg)
 {
   register char *base_ptr = (char *) pbase;