X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnetutl.c;h=1cf03c3daebf6a35c877891c88702098ed623f7f;hp=82a4259bbd9c86eac14a1f7143843d8aed822594;hb=b5bb06200eda170c9836e1b4474d6f5b920c2151;hpb=116ba3b3da73fb857cf75b5c92c6aacd70d94dd9 diff --git a/src/netutl.c b/src/netutl.c index 82a4259b..1cf03c3d 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -1,7 +1,7 @@ /* netutl.c -- some supporting network utility code - Copyright (C) 1998-2002 Ivo Timmermans - 2000-2002 Guus Sliepen + Copyright (C) 1998-2002 Ivo Timmermans + 2000-2002 Guus Sliepen 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: netutl.c,v 1.12.4.38 2002/06/08 12:57:10 guus Exp $ + $Id: netutl.c,v 1.12.4.41 2002/06/21 17:49:48 guus Exp $ */ #include "config.h" @@ -27,8 +27,8 @@ #include #include #include -#ifndef HAVE_STDINT_H - #include +#ifdef HAVE_INTTYPES_H + #include #endif #include #include @@ -241,7 +241,7 @@ cp i = masklen / 8; masklen %= 8; - if(a[i++] & (0xff >> masklen)) + if(masklen && a[i++] & (0xff >> masklen)) return -1; for(; i < len; i++)