Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/resolv/res_comp.c,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/resolv/res_comp.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.11 retrieving revision 1.12 diff -u -p -r1.11 -r1.12 --- src/lib/libc/resolv/res_comp.c 2011/08/17 09:53:53 1.11 +++ src/lib/libc/resolv/res_comp.c 2012/03/13 21:13:43 1.12 @@ -1,4 +1,4 @@ -/* $NetBSD: res_comp.c,v 1.11 2011/08/17 09:53:53 christos Exp $ */ +/* $NetBSD: res_comp.c,v 1.12 2012/03/13 21:13:43 christos Exp $ */ /* * Copyright (c) 1985, 1993 @@ -75,7 +75,7 @@ static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; static const char rcsid[] = "Id: res_comp.c,v 1.5 2005/07/28 06:51:50 marka Exp"; #else -__RCSID("$NetBSD: res_comp.c,v 1.11 2011/08/17 09:53:53 christos Exp $"); +__RCSID("$NetBSD: res_comp.c,v 1.12 2012/03/13 21:13:43 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -86,6 +86,7 @@ __RCSID("$NetBSD: res_comp.c,v 1.11 2011 #include #include #include +#include #include #include #include @@ -148,7 +149,8 @@ dn_skipname(const u_char *ptr, const u_c if (ns_name_skip(&ptr, eom) == -1) return (-1); - return (ptr - saveptr); + _DIAGASSERT(__type_fit(int, ptr - saveptr)); + return (int)(ptr - saveptr); } /*%