X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/5e7a63be9a512bf979e5538e6a694d5fd66b9380..86420bb75f19f628ffd2d8ff9964e59ed99e3187:/util.c diff --git a/util.c b/util.c index 59ed427..7036061 100644 --- a/util.c +++ b/util.c @@ -6,26 +6,22 @@ * - MPI convenience functions */ /* - * This file is - * Copyright (C) 1995--2001 Stephen Early + * This file is part of secnet. + * See README for full list of copyright holders. * - * It is part of secnet, which is - * Copyright (C) 1995--2001 Stephen Early - * Copyright (C) 1998 Ross Anderson, Eli Biham, Lars Knudsen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * secnet is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version d of the License, or + * (at your option) any later version. + * + * secnet 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * version 3 along with secnet; if not, see + * https://www.gnu.org/licenses/gpl.html. */ #include "secnet.h" @@ -452,7 +448,7 @@ void send_nak(const struct comm_addr *dest, uint32_t our_index, " %s; sending NAK\n", comm_addr_to_string(dest), our_index, their_index, msgtype, logwhy); - dest->comm->sendmsg(dest->comm->st, buf, dest); + dest->comm->sendmsg(dest->comm->st, buf, dest, 0); } int consttime_memeq(const void *s1in, const void *s2in, size_t n) @@ -571,7 +567,7 @@ const char *iaddr_to_string(const union iaddr *ia) if (r) { const char fmt[]= "scoped IPv6 addr, error: %.*s"; sprintf(addrbuf, fmt, - ADNS_ADDR2TEXT_BUFLEN - sizeof(fmt) /* underestimate */, + (int)(ADNS_ADDR2TEXT_BUFLEN - sizeof(fmt)) /* underestimate */, strerror(r)); }