-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys/net: fix output of ipv6_addrs_print() #18183
Conversation
ae834b7
to
dffd339
Compare
Hm, there's an underlying issue that causes this, which should be fixed, no? There was also a chain that made the ipv6_addr_print() a function (vs. shell commant), now fmt support is removed. |
Feel free to open an alternative PR :) |
I hoped #18162 would fix the issue with broken output from fmt. The unit test in |
This is on |
I indeed fucked up the printing when reverting the drop of diff --git a/sys/net/network_layer/ipv6/addr/ipv6_addr.c b/sys/net/network_layer/ipv6/addr/ipv6_addr.c
index a6a7962b08..6efafd0ac1 100644
--- a/sys/net/network_layer/ipv6/addr/ipv6_addr.c
+++ b/sys/net/network_layer/ipv6/addr/ipv6_addr.c
@@ -176,10 +176,9 @@ void ipv6_addrs_print(const ipv6_addr_t *addrs, size_t num,
ipv6_addr_to_str(buf, &addrs[num], sizeof(buf));
if (IS_USED(MODULE_FMT)) {
print_str(buf);
- print_str(separator);
}
else {
- printf("%s%s", buf, separator);
+ printf("%s", buf);
}
} |
closing in favor of #18186 |
Contribution description
Output of
ipv6_addrs_print()
is broken when thefmt
module is used.There is also a duplication, so the output without
fmt
will beJust get rid of the
fmt
fallback and simplify the code.Testing procedure
Run e.g.
examples/telnet_server
:master
this patch
Issues/PRs references