pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_filecheck Updated pkg_filecheck to 0.3.
details: https://anonhg.NetBSD.org/pkgsrc/rev/f456f0e40aa3
branches: trunk
changeset: 520653:f456f0e40aa3
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Oct 24 19:23:38 2006 +0000
description:
Updated pkg_filecheck to 0.3.
Bugfix: When allocating more memory, it does not help to double the
amount if the current amount is zero.
diffstat:
pkgtools/pkg_filecheck/Makefile | 4 ++--
pkgtools/pkg_filecheck/files/pkg_filecheck.c | 9 ++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
diffs (37 lines):
diff -r 96a236bcc241 -r f456f0e40aa3 pkgtools/pkg_filecheck/Makefile
--- a/pkgtools/pkg_filecheck/Makefile Tue Oct 24 19:20:57 2006 +0000
+++ b/pkgtools/pkg_filecheck/Makefile Tue Oct 24 19:23:38 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.23 2006/10/24 18:19:22 rillig Exp $
+# $NetBSD: Makefile,v 1.24 2006/10/24 19:23:38 rillig Exp $
#
-DISTNAME= pkg_filecheck-0.2
+DISTNAME= pkg_filecheck-0.3
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff -r 96a236bcc241 -r f456f0e40aa3 pkgtools/pkg_filecheck/files/pkg_filecheck.c
--- a/pkgtools/pkg_filecheck/files/pkg_filecheck.c Tue Oct 24 19:20:57 2006 +0000
+++ b/pkgtools/pkg_filecheck/files/pkg_filecheck.c Tue Oct 24 19:23:38 2006 +0000
@@ -1,5 +1,5 @@
/*
- $NetBSD: pkg_filecheck.c,v 1.3 2006/07/02 10:32:09 rillig Exp $
+ $NetBSD: pkg_filecheck.c,v 1.4 2006/10/24 19:23:38 rillig Exp $
pkg_filecheck.c -- check for files not owned by any package
Copyright (C) 2001 Dieter Baron
@@ -302,10 +302,9 @@
void *p;
if (a->len + 2 > a->alen) {
- if (a->alen > 1024)
- alen = a->alen+1024;
- else
- alen = a->alen * 2;
+ alen = (a->alen == 0) ? 8
+ : (a->alen < 1024) ? (a->alen * 2)
+ : (a->alen + 1024);
if ((p=realloc(a->p, alen*sizeof(void *))) == NULL) {
fprintf(stderr, "%s: malloc failure\n", prg);
Home |
Main Index |
Thread Index |
Old Index