From: Charlie Brej Date: Sat, 28 Nov 2009 18:47:44 +0000 (+0000) Subject: [list] Adds tests of the sort function X-Git-Tag: 0.8.0~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48b61807baadbe0fafcd014354eb0cc615f0ec81;p=thirdparty%2Fplymouth.git [list] Adds tests of the sort function Sorts 100 random integers. Reports any out of order and returns an error code. --- diff --git a/src/libply/ply-list.c b/src/libply/ply-list.c index 66d1cf6f..3ce4753a 100644 --- a/src/libply/ply-list.c +++ b/src/libply/ply-list.c @@ -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); }