diff options
| author | Rao Shoaib <Rao.Shoaib@Sun.COM> | 2009-11-11 08:45:41 -0800 |
|---|---|---|
| committer | Rao Shoaib <Rao.Shoaib@Sun.COM> | 2009-11-11 08:45:41 -0800 |
| commit | 9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829 (patch) | |
| tree | df51891a276edf456c1481f49653a76cdfedee53 /usr/src/lib/libresolv2/common/isc/bitncmp.c | |
| parent | 0324f02a004039d6377111191fdd7134452d7817 (diff) | |
| download | illumos-joyent-9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829.tar.gz | |
6289479 libresolv2 clean up and alignment with libbind.6.0
Diffstat (limited to 'usr/src/lib/libresolv2/common/isc/bitncmp.c')
| -rw-r--r-- | usr/src/lib/libresolv2/common/isc/bitncmp.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/usr/src/lib/libresolv2/common/isc/bitncmp.c b/usr/src/lib/libresolv2/common/isc/bitncmp.c index cc205bdad6..efe5009292 100644 --- a/usr/src/lib/libresolv2/common/isc/bitncmp.c +++ b/usr/src/lib/libresolv2/common/isc/bitncmp.c @@ -1,29 +1,22 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1996,1999 by Internet Software Consortium. + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1996, 1999, 2001 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: bitncmp.c,v 1.7 2001/05/29 05:49:23 marka Exp $"; +static const char rcsid[] = "$Id: bitncmp.c,v 1.5 2008/11/14 02:36:51 marka Exp $"; #endif #include "port_before.h" @@ -36,7 +29,7 @@ static const char rcsid[] = "$Id: bitncmp.c,v 1.7 2001/05/29 05:49:23 marka Exp #include <isc/misc.h> -/* +/*% * int * bitncmp(l, r, n) * compare bit masks l and r, for n bits. @@ -55,7 +48,7 @@ bitncmp(const void *l, const void *r, int n) { b = n / 8; x = memcmp(l, r, b); - if (x) + if (x || (n % 8) == 0) return (x); lb = ((const u_char *)l)[b]; @@ -71,3 +64,5 @@ bitncmp(const void *l, const void *r, int n) { } return (0); } + +/*! \file */ |
