]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/sockunion.c
*: Replace `sizeof something` to sizeof(something)
[mirror_frr.git] / lib / sockunion.c
index e9c418fdf20d36c3c70c399798bd4029b3af1887..63d8a8c69b2b7f824ec1987e4ff631249e25dad0 100644 (file)
@@ -214,7 +214,7 @@ enum connect_result sockunion_connect(int fd, const union sockunion *peersu,
                if (errno != EINPROGRESS) {
                        char str[SU_ADDRSTRLEN];
                        zlog_info("can't connect to %s fd %d : %s",
-                                 sockunion_log(&su, str, sizeof str), fd,
+                                 sockunion_log(&su, str, sizeof(str)), fd,
                                  safe_strerror(errno));
                        return connect_error;
                }
@@ -518,8 +518,8 @@ union sockunion *sockunion_getsockname(int fd)
        } name;
        union sockunion *su;
 
-       memset(&name, 0, sizeof name);
-       len = sizeof name;
+       memset(&name, 0, sizeof(name));
+       len = sizeof(name);
 
        ret = getsockname(fd, (struct sockaddr *)&name, &len);
        if (ret < 0) {
@@ -556,8 +556,8 @@ union sockunion *sockunion_getpeername(int fd)
        } name;
        union sockunion *su;
 
-       memset(&name, 0, sizeof name);
-       len = sizeof name;
+       memset(&name, 0, sizeof(name));
+       len = sizeof(name);
        ret = getpeername(fd, (struct sockaddr *)&name, &len);
        if (ret < 0) {
                flog_err(EC_LIB_SOCKET, "Can't get remote address and port: %s",