tests: avoid using a temp file in wait_for_repl utility
[iwhd.git] / query.c.diff
blob14426520913cd4e00445d81d839c7853d2150071
1 --- query-orig.c 2010-10-12 12:32:09.666434835 -0400
2 +++ query.c 2010-10-12 12:32:09.692391504 -0400
3 @@ -594,7 +594,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 @@ -659,7 +659,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 @@ -677,7 +677,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 @@ -1215,13 +1215,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;