File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ void cleanup1(Tptr p)
244
244
// Insert 2 -- Faster version of Insert
245
245
246
246
#define BUFSIZE 1000
247
- Tptr buf ;
247
+ Tptr buffer ;
248
248
int bufn , freen ;
249
249
void * freearr [10000 ];
250
250
int storestring = 0 ;
@@ -256,6 +256,7 @@ void insert2(char *s)
256
256
257
257
Tptr pp , * p ;
258
258
p = & root ;
259
+ pp = * p ;
259
260
while (pp == * p )
260
261
{
261
262
if ((d = * s - pp -> splitchar ) == 0 )
@@ -274,11 +275,11 @@ void insert2(char *s)
274
275
// *p = (Tptr) malloc(sizeof(Tnode));
275
276
if (bufn -- == 0 )
276
277
{
277
- buf = (Tptr )malloc (BUFSIZE * sizeof (Tnode ));
278
- freearr [freen ++ ] = (void * )buf ;
278
+ buffer = (Tptr )malloc (BUFSIZE * sizeof (Tnode ));
279
+ freearr [freen ++ ] = (void * )buffer ;
279
280
bufn = BUFSIZE - 1 ;
280
281
}
281
- * p = buf ++ ;
282
+ * p = buffer ++ ;
282
283
pp = * p ;
283
284
pp -> splitchar = * s ;
284
285
pp -> lokid = pp -> eqkid = pp -> hikid = 0 ;
You can’t perform that action at this time.
0 commit comments