diff options
author | David Lamparter <equinox@diac24.net> | 2020-03-27 12:35:23 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2020-07-14 10:37:25 +0200 |
commit | 3efd0893d01696b680325679077382992d4eb33f (patch) | |
tree | aac81fef8b8f5194e8280092f625b3f7b58da73b /lib | |
parent | tools: add source code string mangler (diff) | |
download | frr-3efd0893d01696b680325679077382992d4eb33f.tar.xz frr-3efd0893d01696b680325679077382992d4eb33f.zip |
*: un-split strings across lines
Remove mid-string line breaks, cf. workflow doc:
.. [#tool_style_conflicts] For example, lines over 80 characters are allowed
for text strings to make it possible to search the code for them: please
see `Linux kernel style (breaking long lines and strings)
<https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_
and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_.
Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'`
```
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bfd.c | 12 | ||||
-rw-r--r-- | lib/buffer.c | 3 | ||||
-rw-r--r-- | lib/filter_nb.c | 3 | ||||
-rw-r--r-- | lib/if.c | 3 | ||||
-rw-r--r-- | lib/log.c | 9 | ||||
-rw-r--r-- | lib/memory.c | 3 | ||||
-rw-r--r-- | lib/privs.c | 3 | ||||
-rw-r--r-- | lib/routemap.c | 12 | ||||
-rw-r--r-- | lib/sockopt.c | 6 | ||||
-rw-r--r-- | lib/sockunion.c | 3 | ||||
-rw-r--r-- | lib/thread.c | 6 | ||||
-rw-r--r-- | lib/vrf.c | 3 | ||||
-rw-r--r-- | lib/vty.c | 6 | ||||
-rw-r--r-- | lib/zclient.c | 3 |
14 files changed, 25 insertions, 50 deletions
@@ -143,8 +143,7 @@ void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info, if (!zclient || zclient->sock < 0) { if (bfd_debug) zlog_debug( - "%s: Can't send BFD peer register, Zebra client not " - "established", + "%s: Can't send BFD peer register, Zebra client not established", __func__); return; } @@ -217,8 +216,7 @@ struct interface *bfd_get_peer_info(struct stream *s, struct prefix *dp, if (ifp == NULL) { if (bfd_debug) zlog_debug( - "zebra_interface_bfd_read: " - "Can't find interface by ifindex: %d ", + "zebra_interface_bfd_read: Can't find interface by ifindex: %d ", ifindex); return NULL; } @@ -320,8 +318,7 @@ void bfd_show_param(struct vty *vty, struct bfd_info *bfd_info, int bfd_tag, json_bfd); } else { vty_out(vty, - " %s%sDetect Multiplier: %d, Min Rx interval: %d," - " Min Tx interval: %d\n", + " %s%sDetect Multiplier: %d, Min Rx interval: %d, Min Tx interval: %d\n", (extra_space) ? " " : "", (bfd_tag) ? "BFD: " : " ", bfd_info->detect_mult, bfd_info->required_min_rx, bfd_info->desired_min_tx); @@ -397,8 +394,7 @@ void bfd_client_sendmsg(struct zclient *zclient, int command, if (!zclient || zclient->sock < 0) { if (bfd_debug) zlog_debug( - "%s: Can't send BFD client register, Zebra client not " - "established", + "%s: Can't send BFD client register, Zebra client not established", __func__); return; } diff --git a/lib/buffer.c b/lib/buffer.c index ff49bc83d..459d98e75 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -327,8 +327,7 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width, /* This should absolutely never occur. */ flog_err_sys( EC_LIB_SYSTEM_CALL, - "%s: corruption detected: iov_small overflowed; " - "head %p, tail %p, head->next %p", + "%s: corruption detected: iov_small overflowed; head %p, tail %p, head->next %p", __func__, (void *)b->head, (void *)b->tail, (void *)b->head->next); iov = XMALLOC(MTYPE_TMP, diff --git a/lib/filter_nb.c b/lib/filter_nb.c index 83cf586ed..d3d868b46 100644 --- a/lib/filter_nb.c +++ b/lib/filter_nb.c @@ -93,8 +93,7 @@ prefix_list_length_validate(const struct lyd_node *dnode) return NB_OK; log_and_fail: - zlog_info("prefix-list: invalid prefix range for %pFX: " - "Make sure that mask length < ge <= le", &p); + zlog_info("prefix-list: invalid prefix range for %pFX: Make sure that mask length < ge <= le", &p); return NB_ERR_VALIDATION; } @@ -785,8 +785,7 @@ static void if_dump(const struct interface *ifp) struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id); zlog_info( - "Interface %s vrf %s(%u) index %d metric %d mtu %d " - "mtu6 %d %s", + "Interface %s vrf %s(%u) index %d metric %d mtu %d mtu6 %d %s", ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex, ifp->metric, ifp->mtu, ifp->mtu6, if_flag_dump(ifp->flags)); @@ -273,8 +273,7 @@ void zlog_backtrace(int priority) if (size <= 0 || (size_t)size > array_size(array)) { flog_err_sys( EC_LIB_SYSTEM_CALL, - "Cannot get backtrace, returned invalid # of frames %d " - "(valid range is between 1 and %lu)", + "Cannot get backtrace, returned invalid # of frames %d (valid range is between 1 and %lu)", size, (unsigned long)(array_size(array))); return; } @@ -301,8 +300,7 @@ void zlog_thread_info(int log_level) if (tc) zlog(log_level, - "Current thread function %s, scheduled from " - "file %s, line %u", + "Current thread function %s, scheduled from file %s, line %u", tc->funcname, tc->schedfrom, tc->schedfrom_line); else zlog(log_level, "Current thread not known/applicable"); @@ -465,8 +463,7 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute) for (i = 0; i < array_size(route_types); i++) { if (zroute == route_types[i].type) { zlog_warn( - "internal error: route type table out of order " - "while searching for %u, please notify developers", + "internal error: route type table out of order while searching for %u, please notify developers", zroute); return &route_types[i]; } diff --git a/lib/memory.c b/lib/memory.c index 3a2940482..2c902d123 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -157,8 +157,7 @@ static int qmem_exit_walker(void *arg, struct memgroup *mg, struct memtype *mt) if (!mt) { fprintf(eda->fp, - "%s: showing active allocations in " - "memory group %s\n", + "%s: showing active allocations in memory group %s\n", eda->prefix, mg->name); } else if (mt->n_alloc) { diff --git a/lib/privs.c b/lib/privs.c index eb0dbe078..5c7e1240e 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -558,8 +558,7 @@ static void zprivs_caps_init(struct zebra_privs_t *zprivs) /* nonsensical to have gotten here but not have capabilities */ if (!zprivs_state.syscaps_p) { fprintf(stderr, - "%s: capabilities enabled, " - "but no valid capabilities supplied\n", + "%s: capabilities enabled, but no valid capabilities supplied\n", __func__); } diff --git a/lib/routemap.c b/lib/routemap.c index 7749ea4cc..d080385fa 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -353,8 +353,7 @@ int generic_match_add(struct vty *vty, struct route_map_index *index, "%% [%s] Argument form is unsupported or malformed.\n", frr_protonameinst); else - zlog_warn("Argument form is unsupported or malformed: " - "%s %s", command, arg); + zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg); return CMD_WARNING_CONFIG_FAILED; case RMAP_COMPILE_SUCCESS: /* @@ -405,8 +404,7 @@ int generic_match_delete(struct vty *vty, struct route_map_index *index, "%% [%s] Argument form is unsupported or malformed.\n", frr_protonameinst); else - zlog_warn("Argument form is unsupported or malformed: " - "%s %s", command, arg); + zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg); retval = CMD_WARNING_CONFIG_FAILED; break; case RMAP_COMPILE_SUCCESS: @@ -441,8 +439,7 @@ int generic_set_add(struct vty *vty, struct route_map_index *index, "%% [%s] Argument form is unsupported or malformed.\n", frr_protonameinst); else - zlog_warn("Argument form is unsupported or malformed: " - "%s %s", command, arg); + zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg); return CMD_WARNING_CONFIG_FAILED; case RMAP_COMPILE_SUCCESS: break; @@ -470,8 +467,7 @@ int generic_set_delete(struct vty *vty, struct route_map_index *index, "%% [%s] Argument form is unsupported or malformed.\n", frr_protonameinst); else - zlog_warn("Argument form is unsupported or malformed: " - "%s %s", command, arg); + zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg); return CMD_WARNING_CONFIG_FAILED; case RMAP_COMPILE_SUCCESS: break; diff --git a/lib/sockopt.c b/lib/sockopt.c index 45d900879..21fddcd01 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -264,8 +264,7 @@ int setsockopt_ipv4_multicast(int sock, int optname, struct in_addr if_addr, * up */ char buf[1][INET_ADDRSTRLEN]; zlog_info( - "setsockopt_ipv4_multicast attempting to drop and " - "re-add (fd %d, mcast %s, ifindex %u)", + "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %s, ifindex %u)", sock, inet_ntop(AF_INET, &mreqn.imr_multiaddr, buf[0], sizeof(buf[0])), ifindex); @@ -306,8 +305,7 @@ int setsockopt_ipv4_multicast(int sock, int optname, struct in_addr if_addr, * up */ char buf[1][INET_ADDRSTRLEN]; zlog_info( - "setsockopt_ipv4_multicast attempting to drop and " - "re-add (fd %d, mcast %s, ifindex %u)", + "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %s, ifindex %u)", sock, inet_ntop(AF_INET, &mreq.imr_multiaddr, buf[0], sizeof(buf[0])), ifindex); diff --git a/lib/sockunion.c b/lib/sockunion.c index 63d8a8c69..0e7483bfb 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -406,8 +406,7 @@ int sockopt_v6only(int family, int sock) sizeof(int)); if (ret < 0) { flog_err(EC_LIB_SOCKET, - "can't set sockopt IPV6_V6ONLY " - "to socket %d", + "can't set sockopt IPV6_V6ONLY to socket %d", sock); return -1; } diff --git a/lib/thread.c b/lib/thread.c index 9b2f5661a..5c7c10484 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -305,8 +305,7 @@ DEFUN (show_thread_cpu, filter = parse_filter(argv[idx]->arg); if (!filter) { vty_out(vty, - "Invalid filter \"%s\" specified; must contain at least" - "one of 'RWTEXB'\n", + "Invalid filter \"%s\" specified; must contain at leastone of 'RWTEXB'\n", argv[idx]->arg); return CMD_WARNING; } @@ -393,8 +392,7 @@ DEFUN (clear_thread_cpu, filter = parse_filter(argv[idx]->arg); if (!filter) { vty_out(vty, - "Invalid filter \"%s\" specified; must contain at least" - "one of 'RWTEXB'\n", + "Invalid filter \"%s\" specified; must contain at leastone of 'RWTEXB'\n", argv[idx]->arg); return CMD_WARNING; } @@ -691,8 +691,7 @@ int vrf_netns_handler_create(struct vty *vty, struct vrf *vrf, char *pathname, return CMD_SUCCESS; if (vty) vty_out(vty, - "NS %s is already configured" - " with VRF %u(%s)\n", + "NS %s is already configured with VRF %u(%s)\n", ns->name, vrf2->vrf_id, vrf2->name); else zlog_info("NS %s is already configured with VRF %u(%s)", @@ -1244,8 +1244,7 @@ static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes) if (vty->sb_len != TELNET_NAWS_SB_LEN) flog_err( EC_LIB_SYSTEM_CALL, - "RFC 1073 violation detected: telnet NAWS option " - "should send %d characters, but we received %lu", + "RFC 1073 violation detected: telnet NAWS option should send %d characters, but we received %lu", TELNET_NAWS_SB_LEN, (unsigned long)vty->sb_len); else if (sizeof(vty->sb_buf) < TELNET_NAWS_SB_LEN) @@ -1261,8 +1260,7 @@ static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes) | vty->sb_buf[4]); #ifdef TELNET_OPTION_DEBUG vty_out(vty, - "TELNET NAWS window size negotiation completed: " - "width %d, height %d\n", + "TELNET NAWS window size negotiation completed: width %d, height %d\n", vty->width, vty->height); #endif } diff --git a/lib/zclient.c b/lib/zclient.c index 793864243..d8f311fce 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1924,8 +1924,7 @@ static int link_params_set_value(struct stream *s, struct if_link_params *iflp) if (i < bwclassnum) flog_err( EC_LIB_ZAPI_MISSMATCH, - "%s: received %d > %d (MAX_CLASS_TYPE) bw entries" - " - outdated library?", + "%s: received %d > %d (MAX_CLASS_TYPE) bw entries - outdated library?", __func__, bwclassnum, MAX_CLASS_TYPE); } STREAM_GETL(s, iflp->admin_grp); |