]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man3/: EXAMPLES: Remove unnecessary parentheses
authorAlejandro Colomar <alx@kernel.org>
Sun, 5 Jan 2025 13:18:49 +0000 (14:18 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sun, 5 Jan 2025 13:51:18 +0000 (14:51 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man3/dlopen.3
man/man3/hsearch.3
man/man3/rtnetlink.3

index 8c4d368dca613aa7f3ad4ab0eb805055300e0368..c3c6a9a9194cd8fa8c5f807e1b7d2c69d9be01d0 100644 (file)
@@ -582,7 +582,7 @@ main(void)
        POSIX.1\-2001 and POSIX.1\-2008 accepted this state of affairs and
        proposed the following workaround:
 \&
-           *(void **) (&cosine) = dlsym(handle, "cos");
+           *(void **) &cosine = dlsym(handle, "cos");
 \&
        This (clumsy) cast conforms with the ISO C standard and will
        avoid any compiler warnings.
index 1ba6d0a0bdc294a231a879134728498ea1bbb6c5..2ea6f111a04d6c7e9fd1b1ccb56c7bc95cb1bd7d 100644 (file)
@@ -341,7 +341,7 @@ main(void)
         e.key = data[i];
         ep = hsearch(e, FIND);
         printf("%9.9s \-> %9.9s:%d\[rs]n", e.key,
-               ep ? ep\->key : "NULL", ep ? (int)(ep\->data) : 0);
+               ep ? ep\->key : "NULL", ep ? (int) ep\->data : 0);
     }
     hdestroy();
     exit(EXIT_SUCCESS);
index 57dba37f8ca87174f8b32956096af4dd9ad6fb68..8a833d2a6ee3d9e5a0fbd3fb7f4fd84917734e9f 100644 (file)
@@ -106,7 +106,7 @@ req.nh.nlmsg_type = RTM_NEWLINK;
 req.if.ifi_family = AF_UNSPEC;
 req.if.ifi_index = INTERFACE_INDEX;
 req.if.ifi_change = 0xffffffff; /* ??? */
-rta = (struct rtattr *)(((char *) &req) +
+rta = (struct rtattr *) ((char *) &req +
                          NLMSG_ALIGN(req.nh.nlmsg_len));
 rta\->rta_type = IFLA_MTU;
 rta\->rta_len = RTA_LENGTH(sizeof(mtu));