summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortnn <tnn>2007-07-22 13:22:21 +0000
committertnn <tnn>2007-07-22 13:22:21 +0000
commit459d5311ea404bd5f156ed13e26e08d4f68041a0 (patch)
treee8be5e09349f3afe8400475ac4f17d409cffa877
parent11ab1bd41fca6b6937855f6bd2bfa96969841e35 (diff)
downloadpkgsrc-459d5311ea404bd5f156ed13e26e08d4f68041a0.tar.gz
Move variable declaration to top of function body to make this build with
older versions of gcc. From Anonymous on IRC.
-rw-r--r--pkgtools/pkg_install/files/audit-packages/audit-packages.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgtools/pkg_install/files/audit-packages/audit-packages.c b/pkgtools/pkg_install/files/audit-packages/audit-packages.c
index 8be71a6bb39..d847e5203b4 100644
--- a/pkgtools/pkg_install/files/audit-packages/audit-packages.c
+++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.c
@@ -1,4 +1,4 @@
-/* $NetBSD: audit-packages.c,v 1.3 2007/07/21 10:21:04 adrianp Exp $ */
+/* $NetBSD: audit-packages.c,v 1.4 2007/07/22 13:22:21 tnn Exp $ */
/*
* Copyright (c) 2007 Adrian Portelli <adrianp@NetBSD.org>.
@@ -926,12 +926,12 @@ gen_hash(char *hash_input)
int i = 0;
FILE *hash_in;
+ SHA512_CTX hash_ctx;
if ((hash_in = fopen(hash_input, "r")) == NULL) {
errx(EXIT_FAILURE, "Unable to open: %s", hash_input);
}
- SHA512_CTX hash_ctx;
SHA512_Init(&hash_ctx);
line = safe_calloc(MAXLINELEN, sizeof(char));