]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[list] Adds tests of the sort function
authorCharlie Brej <cbrej@cs.man.ac.uk>
Sat, 28 Nov 2009 18:47:44 +0000 (18:47 +0000)
committerCharlie Brej <cbrej@cs.man.ac.uk>
Sat, 28 Nov 2009 18:47:44 +0000 (18:47 +0000)
Sorts 100 random integers. Reports any out of order and returns an error code.

src/libply/ply-list.c

index 66d1cf6fe2a4b0c783f0661057ac281eb03f0537..3ce4753a2d6b7bc231a915a4a56c45e893d5707d 100644 (file)
@@ -363,8 +363,8 @@ main (int    argc,
 
   for (i = 0; i<100; i++)
     {
-      value = malloc(sizeof(int));
-      *value = random() %100;
+      value = malloc (sizeof (int));
+      *value = random() % 100;
       ply_list_append_data (list, (void *) value);
     }