diff options
| author | David Lamparter <equinox@diac24.net> | 2016-11-13 12:19:14 +0900 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-03-08 00:15:39 +0100 |
| commit | 4525281af19b5800ffce4bda83e0957d21ccad43 (patch) | |
| tree | 8919c479f14116f3cae9fc5b051673e2f796371d /zebra/kernel_socket.c | |
| parent | 16077f2fc5f4d73648b4ebef877e1f021864358d (diff) | |
*: get rid of zlog(*, LOG_LEVEL, ...)
Result of running the following Coccinelle patch + fixups:
<<EOF
/* long-forms: zlog(NULL, <level>, ...)
* => zlog_level(...)
*/
@@
expression list args;
@@
- zlog(NULL, LOG_DEBUG, args)
+ zlog_debug(args)
@@
expression list args;
@@
- zlog(NULL, LOG_NOTICE, args)
+ zlog_notice(args)
@@
expression list args;
@@
- zlog(NULL, LOG_INFO, args)
+ zlog_info(args)
@@
expression list args;
@@
- zlog(NULL, LOG_WARNING, args)
+ zlog_warn(args)
@@
expression list args;
@@
- zlog(NULL, LOG_ERR, args)
+ zlog_err(args)
/* long-forms: zlog(base->log, <level>, ...)
* => zlog_level(...)
*/
@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_DEBUG, args)
+ zlog_debug(args)
@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_NOTICE, args)
+ zlog_notice(args)
@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_INFO, args)
+ zlog_info(args)
@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_WARNING, args)
+ zlog_warn(args)
@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_ERR, args)
+ zlog_err(args)
EOF
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/kernel_socket.c')
| -rw-r--r-- | zebra/kernel_socket.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 20a0472195..1bb85a31ab 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -826,9 +826,8 @@ rtm_read_mesg (struct rt_msghdr *rtm, /* rt_msghdr version check. */ if (rtm->rtm_version != RTM_VERSION) - zlog (NULL, LOG_WARNING, - "Routing message version different %d should be %d." - "This may cause problem\n", rtm->rtm_version, RTM_VERSION); + zlog_warn("Routing message version different %d should be %d." "This may cause problem\n", + rtm->rtm_version, RTM_VERSION); /* Be sure structure is cleared */ memset (dest, 0, sizeof (union sockunion)); @@ -852,7 +851,7 @@ rtm_read_mesg (struct rt_msghdr *rtm, /* Assert read up to the end of pointer. */ if (pnt != end) - zlog (NULL, LOG_WARNING, "rtm_read() doesn't read all socket data."); + zlog_warn("rtm_read() doesn't read all socket data."); return rtm->rtm_flags; } |
