[riot-notifications] [RIOT-OS/RIOT] net/netif: add function to get interface by name from a buffer (#16709)

Martine Lenders notifications at github.com
Wed Aug 4 17:00:55 CEST 2021

@miri64 commented on this pull request.

> @@ -65,7 +65,8 @@ netif_t *netif_get_by_name(const char *name)
     while (node) {
        netif_get_name((netif_t *)node, tmp);
-       if (strncmp(name, tmp, CONFIG_NETIF_NAMELENMAX) == 0) {
+       size_t len = strlen(tmp);

Ok, then I remembered that wrong (and the usage of `CONFIG_NETIF_NAMELENMAX` with the original `strncmp()` is not really clear to me then either). 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210804/e862af1a/attachment.htm>

More information about the notifications mailing list