aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2012-08-03 08:10:17 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2012-08-03 10:33:49 +0200
commit13f78d96adf52101aa480e8c83d041f62fcfa1c8 (patch)
tree3cf26170a94292af9c971636ea37efb651be4c1a
parentca302d0ee368b699ffec4cd465ee02f3ed9fe1a1 (diff)
downloadman-pages-13f78d96adf52101aa480e8c83d041f62fcfa1c8.tar.gz
getdents.2, select_tut.2, atof.3, atoi.3, pthread_create.3, pthread_sigmask.3, rtime.3, setbuf.3, tsearch.3, netlink.7: Remove unneeded casts
Reported-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/getdents.24
-rw-r--r--man2/select_tut.24
-rw-r--r--man3/atof.34
-rw-r--r--man3/atoi.34
-rw-r--r--man3/pthread_create.34
-rw-r--r--man3/pthread_sigmask.34
-rw-r--r--man3/rtime.36
-rw-r--r--man3/setbuf.34
-rw-r--r--man3/tsearch.34
-rw-r--r--man7/netlink.76
10 files changed, 22 insertions, 22 deletions
diff --git a/man2/getdents.2 b/man2/getdents.2
index 60d9a11eef..0d61bc6b2c 100644
--- a/man2/getdents.2
+++ b/man2/getdents.2
@@ -24,7 +24,7 @@
.\" Modified 22 July 1995 by Michael Chastain <mec@duracef.shout.net>:
.\" Derived from 'readdir.2'.
.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
-.TH GETDENTS 2 2012-07-13 "Linux" "Linux Programmer's Manual"
+.TH GETDENTS 2 2012-08-03 "Linux" "Linux Programmer's Manual"
.SH NAME
getdents \- get directory entries
.SH SYNOPSIS
@@ -268,7 +268,7 @@ main(int argc, char *argv[])
(d_type == DT_BLK) ? "block dev" :
(d_type == DT_CHR) ? "char dev" : "???");
printf("%4d %10lld %s\\n", d\->d_reclen,
- (long long) d\->d_off, (char *) d->d_name);
+ (long long) d\->d_off, d->d_name);
bpos += d\->d_reclen;
}
}
diff --git a/man2/select_tut.2 b/man2/select_tut.2
index 17c74ac9bb..d9fb610c29 100644
--- a/man2/select_tut.2
+++ b/man2/select_tut.2
@@ -27,7 +27,7 @@
.\" various other changes
.\" 2008-01-26, mtk, substantial changes and rewrites
.\"
-.TH SELECT_TUT 2 2010-06-10 "Linux" "Linux Programmer's Manual"
+.TH SELECT_TUT 2 2012-08-03 "Linux" "Linux Programmer's Manual"
.SH NAME
select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO \-
synchronous I/O multiplexing
@@ -561,7 +561,7 @@ listen_socket(int listen_port)
}
yes = 1;
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
- (char *) &yes, sizeof(yes)) == \-1) {
+ &yes, sizeof(yes)) == \-1) {
perror("setsockopt");
close(s);
return \-1;
diff --git a/man3/atof.3 b/man3/atof.3
index f5f53ea7f3..029f915e26 100644
--- a/man3/atof.3
+++ b/man3/atof.3
@@ -26,7 +26,7 @@
.\" 386BSD man pages
.\" Modified Mon Mar 29 22:39:24 1993, David Metcalfe
.\" Modified Sat Jul 24 21:39:22 1993, Rik Faith (faith@cs.unc.edu)
-.TH ATOF 3 1993-03-29 "GNU" "Linux Programmer's Manual"
+.TH ATOF 3 2012-08-03 "GNU" "Linux Programmer's Manual"
.SH NAME
atof \- convert a string to a double
.SH SYNOPSIS
@@ -44,7 +44,7 @@ pointed to by \fInptr\fP to
The behavior is the same as
.sp
.in +4n
-strtod(nptr, (char **) NULL);
+strtod(nptr, NULL);
.in
.sp
except that
diff --git a/man3/atoi.3 b/man3/atoi.3
index 31c35ca07e..41a4c599d0 100644
--- a/man3/atoi.3
+++ b/man3/atoi.3
@@ -28,7 +28,7 @@
.\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers
.\"
-.TH ATOI 3 2010-09-20 "GNU" "Linux Programmer's Manual"
+.TH ATOI 3 2012-08-03 "GNU" "Linux Programmer's Manual"
.SH NAME
atoi, atol, atoll, atoq \- convert a string to an integer
.SH SYNOPSIS
@@ -68,7 +68,7 @@ pointed to by \fInptr\fP to
The behavior is the same as
.sp
.in +4n
-strtol(nptr, (char **) NULL, 10);
+strtol(nptr, NULL, 10);
.in
.sp
except that
diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
index 66190bb7f9..42df8591f2 100644
--- a/man3/pthread_create.3
+++ b/man3/pthread_create.3
@@ -21,7 +21,7 @@
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
-.TH PTHREAD_CREATE 3 2012-03-15 "Linux" "Linux Programmer's Manual"
+.TH PTHREAD_CREATE 3 2012-08-03 "Linux" "Linux Programmer's Manual"
.SH NAME
pthread_create \- create a new thread
.SH SYNOPSIS
@@ -265,7 +265,7 @@ struct thread_info { /* Used as argument to thread_start() */
static void *
thread_start(void *arg)
{
- struct thread_info *tinfo = (struct thread_info *) arg;
+ struct thread_info *tinfo = arg;
char *uargv, *p;
printf("Thread %d: top of stack near %p; argv_string=%s\\n",
diff --git a/man3/pthread_sigmask.3 b/man3/pthread_sigmask.3
index ffdc6ca942..de78dac7b9 100644
--- a/man3/pthread_sigmask.3
+++ b/man3/pthread_sigmask.3
@@ -21,7 +21,7 @@
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
-.TH PTHREAD_SIGMASK 3 2011-10-16 "Linux" "Linux Programmer's Manual"
+.TH PTHREAD_SIGMASK 3 2012-08-03 "Linux" "Linux Programmer's Manual"
.SH NAME
pthread_sigmask \- examine and change mask of blocked signals
.SH SYNOPSIS
@@ -92,7 +92,7 @@ Signal handling thread got signal 10
static void *
sig_thread(void *arg)
{
- sigset_t *set = (sigset_t *) arg;
+ sigset_t *set = arg;
int s, sig;
for (;;) {
diff --git a/man3/rtime.3 b/man3/rtime.3
index e19429e39c..c37672a4b2 100644
--- a/man3/rtime.3
+++ b/man3/rtime.3
@@ -5,7 +5,7 @@
.\"
.\" Slightly polished, aeb, 2003-04-06
.\"
-.TH RTIME 3 2010-02-25 "GNU" "Linux Programmer's Manual"
+.TH RTIME 3 2012-08-03 "GNU" "Linux Programmer's Manual"
.SH NAME
rtime \- get time from a remote machine
.SH SYNOPSIS
@@ -103,10 +103,10 @@ main(void)
struct hostent *hent;
int ret;
- memset((char *) &name, 0, sizeof(name));
+ memset(&name, 0, sizeof(name));
sethostent(1);
hent = gethostbyname(servername);
- memcpy((char *) &name.sin_addr, hent\->h_addr, hent\->h_length);
+ memcpy(&name.sin_addr, hent\->h_addr, hent\->h_length);
ret = rtime(&name, &time1, use_tcp ? NULL : &timeout);
if (ret < 0)
diff --git a/man3/setbuf.3 b/man3/setbuf.3
index b9d41a91d4..49fca4dc74 100644
--- a/man3/setbuf.3
+++ b/man3/setbuf.3
@@ -43,7 +43,7 @@
.\" Correction, 2000-03-03, Andreas Jaeger <aj@suse.de>
.\" Added return value for setvbuf, aeb,
.\"
-.TH SETBUF 3 2008-06-26 "Linux" "Linux Programmer's Manual"
+.TH SETBUF 3 2012-08-03 "Linux" "Linux Programmer's Manual"
.SH NAME
setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations
.SH SYNOPSIS
@@ -145,7 +145,7 @@ The
function is exactly equivalent to the call:
.PP
.in +4n
-setvbuf(stream, (char *) NULL, _IOLBF, 0);
+setvbuf(stream, NULL, _IOLBF, 0);
.in
.SH "RETURN VALUE"
The function
diff --git a/man3/tsearch.3 b/man3/tsearch.3
index bb96740f3c..daedc88cfb 100644
--- a/man3/tsearch.3
+++ b/man3/tsearch.3
@@ -21,7 +21,7 @@
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
-.TH TSEARCH 3 2012-06-11 "GNU" "Linux Programmer's Manual"
+.TH TSEARCH 3 2012-08-03 "GNU" "Linux Programmer's Manual"
.SH NAME
tsearch, tfind, tdelete, twalk, tdestroy \- manage a binary tree
.SH SYNOPSIS
@@ -273,7 +273,7 @@ main(void)
srand(time(NULL));
for (i = 0; i < 12; i++) {
- ptr = (int *) xmalloc(sizeof(int));
+ ptr = xmalloc(sizeof(int));
*ptr = rand() & 0xff;
val = tsearch((void *) ptr, &root, compare);
if (val == NULL)
diff --git a/man7/netlink.7 b/man7/netlink.7
index 2b60fe309e..35016a2876 100644
--- a/man7/netlink.7
+++ b/man7/netlink.7
@@ -417,10 +417,10 @@ in order to reliably track acknowledgements.
.nf
struct nlmsghdr *nh; /* The nlmsghdr with payload to send. */
struct sockaddr_nl sa;
-struct iovec iov = { (void *) nh, nh\->nlmsg_len };
+struct iovec iov = { nh, nh\->nlmsg_len };
struct msghdr msg;
-msg = { (void *)&sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
+msg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
memset(&sa, 0, sizeof(sa));
sa.nl_family = AF_NETLINK;
nh\->nlmsg_pid = 0;
@@ -443,7 +443,7 @@ struct sockaddr_nl sa;
struct msghdr msg;
struct nlmsghdr *nh;
-msg = { (void *)&sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
+msg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
len = recvmsg(fd, &msg, 0);
for (nh = (struct nlmsghdr *) buf; NLMSG_OK (nh, len);