X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnetutl.c;h=0d34d8d64a73223c27353b93d4a9163b64612227;hp=6784833dabe7e5e22dd640d8ec8664a059d12de5;hb=eefa28059ab989c915a7d95fb4ae728abd7ce713;hpb=471308e1636e7a06e1d9ebc98e82b1c0c5150dde;ds=sidebyside diff --git a/src/netutl.c b/src/netutl.c index 6784833d..0d34d8d6 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -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.47 2003/07/17 15:06:26 guus Exp $ + $Id: netutl.c,v 1.12.4.48 2003/07/22 20:55:20 guus Exp $ */ #include "system.h" @@ -28,7 +28,7 @@ #include "utils.h" #include "xalloc.h" -int hostnames = 0; +bool hostnames = false; /* Turn a string into a struct addrinfo. @@ -244,7 +244,7 @@ void maskcpy(void *va, void *vb, int masklen, int len) a[i] = 0; } -int maskcheck(void *va, int masklen, int len) +bool maskcheck(void *va, int masklen, int len) { int i; char *a = va; @@ -255,11 +255,11 @@ int maskcheck(void *va, int masklen, int len) masklen %= 8; if(masklen && a[i++] & (0xff >> masklen)) - return -1; + return false; for(; i < len; i++) if(a[i] != 0) - return -2; + return false; - return 0; + return true; }