X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/1a6043f94e906b20ba06a5494eee19798cd95d07..9fcce036ef8b14c12fc4482efc7c8cf75da3b31f:/fdpass.c diff --git a/fdpass.c b/fdpass.c index 0a11c2c..e889953 100644 --- a/fdpass.c +++ b/fdpass.c @@ -7,7 +7,7 @@ * (c) 2003 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of the mLib utilities library. * @@ -15,12 +15,12 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * mLib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with mLib; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, @@ -77,7 +77,7 @@ ssize_t fdpass_send(int sock, int fd, const void *p, size_t sz) #ifdef HAVE_MSG_ACCRIGHTS msg.msg_accrights = &fd; msg.msg_accrightslen = sizeof(fd); -#else +#else msg.msg_flags = 0; msg.msg_control = buf; msg.msg_controllen = sizeof(buf); @@ -139,7 +139,7 @@ ssize_t fdpass_recv(int sock, int *fd, void *p, size_t sz) for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS && - cmsg->cmsg_len >= CMSG_LEN(sizeof(fd))) { + cmsg->cmsg_len >= CMSG_LEN(sizeof(fd))) { memcpy(&fdtmp, CMSG_DATA(cmsg), sizeof(fdtmp)); if (*fd == -1) *fd = fdtmp;