diff options
author | David Lamparter <equinox@diac24.net> | 2016-11-13 04:19:14 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-03-08 00:15:39 +0100 |
commit | 4525281af19b5800ffce4bda83e0957d21ccad43 (patch) | |
tree | 8919c479f14116f3cae9fc5b051673e2f796371d /ripngd/ripngd.c | |
parent | *: add frr_run() (diff) | |
download | frr-4525281af19b5800ffce4bda83e0957d21ccad43.tar.xz frr-4525281af19b5800ffce4bda83e0957d21ccad43.zip |
*: 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 'ripngd/ripngd.c')
-rw-r--r-- | ripngd/ripngd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index b4f82575a..108da21c1 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -107,7 +107,7 @@ ripng_make_socket (void) sock = socket (AF_INET6, SOCK_DGRAM, 0); if (sock < 0) { - zlog (NULL, LOG_ERR, "Can't make ripng socket"); + zlog_err("Can't make ripng socket"); return sock; } @@ -143,7 +143,7 @@ ripng_make_socket (void) ret = bind (sock, (struct sockaddr *) &ripaddr, sizeof (ripaddr)); if (ret < 0) { - zlog (NULL, LOG_ERR, "Can't bind ripng socket: %s.", safe_strerror (errno)); + zlog_err("Can't bind ripng socket: %s.", safe_strerror(errno)); if (ripngd_privs.change (ZPRIVS_LOWER)) zlog_err ("ripng_make_socket: could not lower privs"); return ret; @@ -1448,8 +1448,7 @@ ripng_update (struct thread *t) if (ri->ri_send == RIPNG_SEND_OFF) { if (IS_RIPNG_DEBUG_EVENT) - zlog (NULL, LOG_DEBUG, - "[Event] RIPng send to if %d is suppressed by config", + zlog_debug ("[Event] RIPng send to if %d is suppressed by config", ifp->ifindex); continue; } |