From 24823f1ab0f16e0815ef44340894537dc4babf6a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Aug 2011 16:01:28 +1000 Subject: xfree86: switch options from pointer to XF86OptionPtr In all cases, the pointer was simply type-cast anyway. Let's get some compile-time type safety going, how about that. Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson Squashed in: xfree86: Move definition of xf86OptionPtr into separate header file The pile of spaghettis that is the xfree86 include dependencies make it rather hard to have a single typedef somewhere that's not interfering with everything else or drags in a whole bunch of other includes. Move the xf86OptionRec and GenericListRec declarations into a separate header. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith --- test/xfree86.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/xfree86.c b/test/xfree86.c index 2b591cfde..7012e90c3 100644 --- a/test/xfree86.c +++ b/test/xfree86.c @@ -33,14 +33,15 @@ static void xfree86_option_list_duplicate(void) { - pointer options; - pointer duplicate; + XF86OptionPtr options; + XF86OptionPtr duplicate; const char *o1 = "foo", *o2 = "bar", *v1 = "one", *v2 = "two"; const char *o_null= "NULL"; char *val1, *val2; + XF86OptionPtr a, b; duplicate = xf86OptionListDuplicate(NULL); assert(!duplicate); @@ -67,9 +68,9 @@ xfree86_option_list_duplicate(void) assert(strcmp(val1, v2) == 0); assert(strcmp(val1, val2) == 0); - val1 = xf86FindOption(options, o_null); - val2 = xf86FindOption(duplicate, o_null); - assert(val1 && val2); + a = xf86FindOption(options, o_null); + b = xf86FindOption(duplicate, o_null); + assert(a && b); } int main(int argc, char** argv) -- cgit v1.2.3