diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-08-03 16:01:28 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-09-27 11:43:36 +1000 |
commit | 24823f1ab0f16e0815ef44340894537dc4babf6a (patch) | |
tree | d085a5265bb1a2ddfa08c7053caab474ca876717 /test/xfree86.c | |
parent | 05284a03f9002b03a66ae355b34790ec02b726f0 (diff) |
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 <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
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 <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'test/xfree86.c')
-rw-r--r-- | test/xfree86.c | 11 |
1 files changed, 6 insertions, 5 deletions
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) |