From: Nigel Metheringham Date: Thu, 24 May 2012 15:40:42 +0000 (+0100) Subject: Moved pdkim declaration to satisfy older compilers X-Git-Tag: exim-4_80_RC6~15 X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=commitdiff_plain;h=a3c1395faebdb088bcef9cdb55bb42a791433ccd;ds=sidebyside 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 --- 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;