fix formatting
This commit is contained in:
parent
0371d66a64
commit
6566d27da4
|
@ -2483,14 +2483,16 @@ cygwin_recvmsg(int s, struct msghdr *msg, int flags)
|
|||
for(i = 0; i < msg->msg_iovlen; ++i)
|
||||
tot += iov[i].iov_len;
|
||||
buf = (char *) malloc(tot);
|
||||
if (tot != 0 && buf == NULL) {
|
||||
if (tot != 0 && buf == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
nb = ret = cygwin_recvfrom (s, buf, tot, flags,
|
||||
(struct sockaddr *) msg->msg_name, (int *) &msg->msg_namelen);
|
||||
p = buf;
|
||||
while (nb > 0) {
|
||||
while (nb > 0)
|
||||
{
|
||||
ssize_t cnt = min(nb, iov->iov_len);
|
||||
|
||||
memcpy (iov->iov_base, p, cnt);
|
||||
|
@ -2515,12 +2517,14 @@ cygwin_sendmsg(int s, const struct msghdr *msg, int flags)
|
|||
for(i = 0; i < msg->msg_iovlen; ++i)
|
||||
tot += iov[i].iov_len;
|
||||
buf = (char *) malloc(tot);
|
||||
if (tot != 0 && buf == NULL) {
|
||||
if (tot != 0 && buf == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
p = buf;
|
||||
for (i = 0; i < msg->msg_iovlen; ++i) {
|
||||
for (i = 0; i < msg->msg_iovlen; ++i)
|
||||
{
|
||||
memcpy (p, iov[i].iov_base, iov[i].iov_len);
|
||||
p += iov[i].iov_len;
|
||||
}
|
||||
|
|
|
@ -165,7 +165,8 @@ gettimeofday(struct timeval *tv, struct timezone *tz)
|
|||
|
||||
if (tz != NULL)
|
||||
{
|
||||
if (!tzflag) {
|
||||
if (!tzflag)
|
||||
{
|
||||
tzset();
|
||||
tzflag = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue