fix misuse of typesafe_cb_cast() in example
authorYubin Ruan <ablacktshirt@gmail.com>
Wed, 14 Mar 2018 03:16:42 +0000 (11:16 +0800)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 14 Mar 2018 04:54:21 +0000 (15:54 +1100)
From 32f86c701ab0e0ad0ad6981314a9bff2dc5ebb74 Mon Sep 17 00:00:00 2001
From: Yubin Ruan <ablacktshirt@gmail.com>
Date: Wed, 14 Mar 2018 11:14:54 +0800
Subject: [PATCH] fix misuse of typesafe_cb_cast() in example

Signed-off-by: Yubin Ruan <ablacktshirt@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/typesafe_cb/typesafe_cb.h

index 942d5c2d11323e38fb23e5a40d28bd80aaf0e18d..126d325c7821ac945375d1c9ebcc2f5ccfb2004c 100644 (file)
@@ -27,7 +27,7 @@
  *     // We can take either an unsigned long or a void *.
  *     void _set_some_value(void *val);
  *     #define set_some_value(e)                       \
- *             _set_some_value(typesafe_cb_cast(void *, (e), unsigned long))
+ *             _set_some_value(typesafe_cb_cast(void *, unsigned long, (e)))
  */
 #define typesafe_cb_cast(desttype, oktype, expr)                       \
        __builtin_choose_expr(                                          \