Commit 9771254f authored by David Gobbi's avatar David Gobbi
Browse files

Before c99, variable decls go before other statements.

Change-Id: I949d737991fabc7f186f90273c38a590dde25241
parent 9791802c
...@@ -275,8 +275,8 @@ static MacroInfo **preproc_macro_location( ...@@ -275,8 +275,8 @@ static MacroInfo **preproc_macro_location(
/* if n+1 is a power of two, double allocated space */ /* if n+1 is a power of two, double allocated space */
if (n > 0 && (n & (n+1)) == 0) if (n > 0 && (n & (n+1)) == 0)
{ {
hptr = htable[i];
MacroInfo **oldhptr = hptr; MacroInfo **oldhptr = hptr;
hptr = htable[i];
hptr = (MacroInfo **)realloc(hptr, (2*(n+1))*sizeof(MacroInfo *)); hptr = (MacroInfo **)realloc(hptr, (2*(n+1))*sizeof(MacroInfo *));
if (!hptr) if (!hptr)
{ {
...@@ -1560,8 +1560,8 @@ const char *preproc_find_include_file( ...@@ -1560,8 +1560,8 @@ const char *preproc_find_include_file(
{ {
if (m+1 > outputsize) if (m+1 > outputsize)
{ {
outputsize += m+1;
char *oldoutput = output; char *oldoutput = output;
outputsize += m+1;
output = (char *)realloc(output, outputsize); output = (char *)realloc(output, outputsize);
if (!output) if (!output)
{ {
...@@ -1621,8 +1621,8 @@ const char *preproc_find_include_file( ...@@ -1621,8 +1621,8 @@ const char *preproc_find_include_file(
} }
if (m+j+1 > outputsize) if (m+j+1 > outputsize)
{ {
outputsize += m+j+1;
char *oldoutput = output; char *oldoutput = output;
outputsize += m+j+1;
output = (char *)realloc(output, outputsize); output = (char *)realloc(output, outputsize);
if (!output) if (!output)
{ {
...@@ -1641,8 +1641,8 @@ const char *preproc_find_include_file( ...@@ -1641,8 +1641,8 @@ const char *preproc_find_include_file(
{ {
if (m+1 > outputsize) if (m+1 > outputsize)
{ {
outputsize += m+1;
char *oldoutput = output; char *oldoutput = output;
outputsize += m+1;
output = (char *)realloc(output, outputsize); output = (char *)realloc(output, outputsize);
if (!output) if (!output)
{ {
...@@ -1661,8 +1661,8 @@ const char *preproc_find_include_file( ...@@ -1661,8 +1661,8 @@ const char *preproc_find_include_file(
j = strlen(directory); j = strlen(directory);
if (j + m + 2 > outputsize) if (j + m + 2 > outputsize)
{ {
outputsize += j+m+2;
char *oldoutput = output; char *oldoutput = output;
outputsize += j+m+2;
output = (char *)realloc(output, outputsize); output = (char *)realloc(output, outputsize);
if (!output) if (!output)
{ {
...@@ -1745,8 +1745,8 @@ void preproc_escape_string( ...@@ -1745,8 +1745,8 @@ void preproc_escape_string(
/* expand line buffer as necessary */ /* expand line buffer as necessary */
while (j+4 > linelen) while (j+4 > linelen)
{ {
linelen *= 2;
char *oldline = line; char *oldline = line;
linelen *= 2;
line = (char *)realloc(line, linelen); line = (char *)realloc(line, linelen);
if (!line) if (!line)
{ {
...@@ -1948,8 +1948,8 @@ static int preproc_include_file( ...@@ -1948,8 +1948,8 @@ static int preproc_include_file(
/* expand line buffer as necessary */ /* expand line buffer as necessary */
while (j+4 > linelen) while (j+4 > linelen)
{ {
linelen *= 2;
char *oldline = line; char *oldline = line;
linelen *= 2;
line = (char *)realloc(line, linelen); line = (char *)realloc(line, linelen);
if (!line) if (!line)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment