Fix various issues in policy syntax.
[iwhd.git] / query.c.diff
blob22b8f7e671e70d2ecba2cfb556fd0aab981de221
1 --- query-orig.c 2010-10-01 12:56:20.000000000 -0400
2 +++ query.c 2010-10-01 12:56:20.000000000 -0400
3 @@ -538,7 +538,7 @@ YY_LOCAL(int) yyrefill(void)
4 while (yybuflen - yypos < 512)
6 yybuflen *= 2;
7 - yybuf= realloc(yybuf, yybuflen);
8 + yybuf= xrealloc(yybuf, yybuflen);
10 YY_INPUT((yybuf + yypos), yyn, (yybuflen - yypos));
11 if (!yyn) return 0;
12 @@ -603,7 +603,7 @@ YY_LOCAL(void) yyDo(yyaction action, int
13 while (yythunkpos >= yythunkslen)
15 yythunkslen *= 2;
16 - yythunks= realloc(yythunks, sizeof(yythunk) * yythunkslen);
17 + yythunks= xrealloc(yythunks, sizeof(yythunk) * yythunkslen);
19 yythunks[yythunkpos].begin= begin;
20 yythunks[yythunkpos].end= end;
21 @@ -621,7 +621,7 @@ YY_LOCAL(int) yyText(int begin, int end)
22 while (yytextlen < (yyleng - 1))
24 yytextlen *= 2;
25 - yytext= realloc(yytext, yytextlen);
26 + yytext= xrealloc(yytext, yytextlen);
28 memcpy(yytext, yybuf + begin, yyleng);
30 @@ -1159,13 +1159,13 @@ YY_PARSE(int) YYPARSEFROM(yyrule yystart
31 if (!yybuflen)
33 yybuflen= 1024;
34 - yybuf= malloc(yybuflen);
35 + yybuf= xmalloc(yybuflen);
36 yytextlen= 1024;
37 - yytext= malloc(yytextlen);
38 + yytext= xmalloc(yytextlen);
39 yythunkslen= 32;
40 - yythunks= malloc(sizeof(yythunk) * yythunkslen);
41 + yythunks= xmalloc(sizeof(yythunk) * yythunkslen);
42 yyvalslen= 32;
43 - yyvals= malloc(sizeof(YYSTYPE) * yyvalslen);
44 + yyvals= xmalloc(sizeof(YYSTYPE) * yyvalslen);
45 yybegin= yyend= yypos= yylimit= yythunkpos= 0;
47 yybegin= yyend= yypos;