From 8fc7cbfd0ce103c853eea617b7016751a5ffef29 Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Wed, 11 Apr 2012 09:35:15 +0000 Subject: [PATCH] Fix some C conformity (declare variables before function calls, silly humbedooh) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1324668 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/developer/modguide.html.en | 7 +++++-- docs/manual/developer/modguide.xml | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/manual/developer/modguide.html.en b/docs/manual/developer/modguide.html.en index a722c83158..9ae84c2563 100644 --- a/docs/manual/developer/modguide.html.en +++ b/docs/manual/developer/modguide.html.en @@ -463,11 +463,14 @@ Let's put these functions into an example handler:
static int example_handler(request_rec *r) { const char* original = "You can't edit this!"; + char* copy; + int* integers; + /* Allocate space for 10 integer values and set them all to zero. */ - int* integers = apr_pcalloc(r->pool, sizeof(int)*10); + integers = apr_pcalloc(r->pool, sizeof(int)*10); /* Create a copy of the 'original' variable that we can edit. */ - char* copy = apr_pstrdup(r->pool, original); + copy = apr_pstrdup(r->pool, original); return OK; } diff --git a/docs/manual/developer/modguide.xml b/docs/manual/developer/modguide.xml index 7d1f3596df..e284e2cbb3 100644 --- a/docs/manual/developer/modguide.xml +++ b/docs/manual/developer/modguide.xml @@ -461,11 +461,14 @@ Let's put these functions into an example handler:
static int example_handler(request_rec *r) { const char* original = "You can't edit this!"; + char* copy; + int* integers; + /* Allocate space for 10 integer values and set them all to zero. */ - int* integers = apr_pcalloc(r->pool, sizeof(int)*10); + integers = apr_pcalloc(r->pool, sizeof(int)*10); /* Create a copy of the 'original' variable that we can edit. */ - char* copy = apr_pstrdup(r->pool, original); + copy = apr_pstrdup(r->pool, original); return OK; } -- 2.40.0