Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/pkgsrc/pkgtools/pkg_install/files/lib/iterate.c,v rcsdiff: /ftp/cvs/cvsroot/pkgsrc/pkgtools/pkg_install/files/lib/iterate.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- pkgsrc/pkgtools/pkg_install/files/lib/iterate.c 2009/02/02 12:35:01 1.6 +++ pkgsrc/pkgtools/pkg_install/files/lib/iterate.c 2009/08/02 17:56:45 1.7 @@ -1,4 +1,4 @@ -/* $NetBSD: iterate.c,v 1.6 2009/02/02 12:35:01 joerg Exp $ */ +/* $NetBSD: iterate.c,v 1.7 2009/08/02 17:56:45 joerg Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger . @@ -44,10 +44,6 @@ #include "lib.h" -#ifndef __UNCONST -#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a)) -#endif - /* * Generic iteration function: * - get new entries from srciter, stop on NULL @@ -182,7 +178,7 @@ match_by_basename(const char *pkg, void return 0; } if (strncmp(pkg, target, pkg_version - pkg) == 0 && - strlen(target) == pkg_version - pkg) + pkg + strlen(target) == pkg_version) return 1; else return 0; @@ -198,7 +194,7 @@ match_by_pattern(const char *pkg, void * struct add_matching_arg { lpkg_head_t *pkghead; - size_t got_match; + int got_match; int (*match_fn)(const char *pkg, void *cookie); void *cookie; }; @@ -398,6 +394,7 @@ match_best_file(const char *filename, vo return 0; default: errx(EXIT_FAILURE, "Invalid error from pkg_order"); + /* NOTREACHED */ } }