mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
ca302d0ee3
commit
13f78d96ad
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 (;;) {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue