X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Frtnetlink.c;h=2e1c17330adcd4a5f6c34203de752ea9337b2e5f;hb=4e8e4213a815a30216e855a805a8bcd5b8c5a886;hp=1d302ea635513d62285e9e6ef90b22ea049e7b7c;hpb=5f55c39b21e69025045437ffbd3bb98fe6ce2e89;p=openvswitch diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c index 1d302ea6..2e1c1733 100644 --- a/lib/rtnetlink.c +++ b/lib/rtnetlink.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,10 +27,10 @@ #include "coverage.h" #include "netlink.h" #include "ofpbuf.h" - -#define THIS_MODULE VLM_rtnetlink #include "vlog.h" +VLOG_DEFINE_THIS_MODULE(rtnetlink) + /* rtnetlink socket. */ static struct nl_sock *notify_sock; @@ -166,8 +166,7 @@ rtnetlink_report_change(const struct nlmsghdr *nlmsg, change.master_ifindex = (attrs[IFLA_MASTER] ? nl_attr_get_u32(attrs[IFLA_MASTER]) : 0); - LIST_FOR_EACH (notifier, struct rtnetlink_notifier, node, - &all_notifiers) { + LIST_FOR_EACH (notifier, node, &all_notifiers) { notifier->cb(&change, notifier->aux); } } @@ -177,8 +176,7 @@ rtnetlink_report_notify_error(void) { struct rtnetlink_notifier *notifier; - LIST_FOR_EACH (notifier, struct rtnetlink_notifier, node, - &all_notifiers) { + LIST_FOR_EACH (notifier, node, &all_notifiers) { notifier->cb(NULL, notifier->aux); } }