[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#357051: [PATCH] fix sorting/search example



Patch attached.

ttfn/rjk
--- manual/examples/search.c~	2009-12-08 20:10:20.000000000 +0000
+++ manual/examples/search.c	2011-02-05 13:32:59.000000000 +0000
@@ -36,8 +36,9 @@
 /* This is the comparison function used for sorting and searching. */
 
 int 
-critter_cmp (const struct critter *c1, const struct critter *c2)
+critter_cmp (const void *c1v, const void *c2v)
 {
+  const struct critter *c1 = c1v, *c2 = c2v;
   return strcmp (c1->name, c2->name);
 }
 

Reply to: