From a3c1395faebdb088bcef9cdb55bb42a791433ccd Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Thu, 24 May 2012 16:40:42 +0100 Subject: [PATCH] Moved pdkim declaration to satisfy older compilers As suggested by Dennis Davis to fix an error with gcc 2.95.2 which threw the following error:- gcc pdkim.c pdkim.c: In function `pdkim_feed_finish': pdkim.c:1389: parse error before `*' pdkim.c:1390: `hdrs' undeclared (first use in this function) pdkim.c:1390: (Each undeclared identifier is reported only once pdkim.c:1390: for each function it appears in.) gmake[2]: *** [pdkim.o] Error 1 See https://lists.exim.org/lurker/message/20120524.094800.89928246.en.html --- src/src/pdkim/pdkim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index a7e5692e9..4f0da3f71 100644 --- a/src/src/pdkim/pdkim.c +++ b/src/src/pdkim/pdkim.c @@ -1383,10 +1383,11 @@ DLLEXPORT int pdkim_feed_finish(pdkim_ctx *ctx, pdkim_signature **return_signatu char *b = strdup(sig->headernames); char *p = b; char *q = NULL; + pdkim_stringlist *hdrs = ctx->headers; + if (b == NULL) return PDKIM_ERR_OOM; /* clear tags */ - pdkim_stringlist *hdrs = ctx->headers; while (hdrs != NULL) { hdrs->tag = 0; hdrs = hdrs->next; -- 2.25.1