The branch main has been updated by bapt:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=782766a32d963587a6aac8521aedd132b68a9dab

commit 782766a32d963587a6aac8521aedd132b68a9dab
Author:     Baptiste Daroussin <b...@freebsd.org>
AuthorDate: 2024-10-07 13:28:54 +0000
Commit:     Baptiste Daroussin <b...@freebsd.org>
CommitDate: 2024-10-07 13:28:54 +0000

    genl: small cleanup
    
    Following up from another review using basically the same code:
    remove useless cast
    replace uint32_t with unsigned int.
    
    No functional changes expected
---
 usr.bin/genl/genl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.bin/genl/genl.c b/usr.bin/genl/genl.c
index 48c74fa20c81..df2758c273f3 100644
--- a/usr.bin/genl/genl.c
+++ b/usr.bin/genl/genl.c
@@ -247,13 +247,13 @@ monitor_mcast(int argc __unused, char **argv)
                errx(EXIT_FAILURE, "Unknown family '%s'", argv[0]);
        if (argc == 1)
                all = true;
-       for (uint32_t i = 0; i < attrs.mcast_groups.num_groups; i++) {
+       for (unsigned int i = 0; i < attrs.mcast_groups.num_groups; i++) {
                if (all || strcmp(attrs.mcast_groups.groups[i]->mcast_grp_name,
                    argv[1]) == 0) {
                        found = true;
                        if (setsockopt(ss.fd, SOL_NETLINK,
                            NETLINK_ADD_MEMBERSHIP,
-                           (void *)&attrs.mcast_groups.groups[i]->mcast_grp_id,
+                           &attrs.mcast_groups.groups[i]->mcast_grp_id,
                            sizeof(attrs.mcast_groups.groups[i]->mcast_grp_id))
                            == -1)
                                err(EXIT_FAILURE, "Cannot subscribe to command "

Reply via email to