From: Daniel Gruno Date: Wed, 11 Apr 2012 09:35:15 +0000 (+0000) Subject: Fix some C conformity (declare variables before function calls, silly humbedooh) X-Git-Tag: 2.5.0-alpha~7209 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fc7cbfd0ce103c853eea617b7016751a5ffef29;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/docs/manual/developer/modguide.html.en b/docs/manual/developer/modguide.html.en index a722c831585..9ae84c2563e 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 7d1f3596dfa..e284e2cbb36 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; }