pkarashchenko commented on code in PR #8864:
URL: https://github.com/apache/nuttx/pull/8864#discussion_r1161699334
##########
net/netlink/netlink.h:
##########
@@ -44,11 +44,142 @@
****************************************************************************/
#ifndef CONFIG_NETLINK_ROUTE
- #define netlink_device_notify(dev)
+# define netlink_device_notify(dev)
+# define netlink_device_notify_ipaddr(dev, type, domain)
#endif
#ifdef CONFIG_NET_NETLINK
+/**
+ * nla_for_each_attr - iterate over a stream of attributes
+ * @pos: loop counter, set to current attribute
+ * @head: head of attribute stream
+ * @len: length of attribute stream
+ * @rem: initialized to len, holds bytes currently remaining in stream
+ */
+
+#define nla_for_each_attr(pos, head, len, rem) \
+ for (pos = head, rem = len; nla_ok(pos, rem); \
+ pos = nla_next(pos, &(rem)))
+
+/* Always use this macro, this allows later putting the
+ * message into a separate section or such for things
+ * like translation or listing all possible messages.
+ * Currently string formatting is not supported (due
+ * to the lack of an output buffer.)
+ */
+
+#define nl_set_err_msg_attr(extack, attr, msg) \
+ do \
+ { \
+ static const char __msg[] = msg; \
Review Comment:
```suggestion
static const char __msg[] = (msg); \
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]