Browse code

Initialize nested function array

Jan Halla authored on 31/05/2006 17:03:11
Showing 1 changed files
... ...
@@ -58,7 +58,7 @@ int resolve_select(select_t* s)
58 58
 
59 59
 	f = NULL;
60 60
 	nested = 0;
61
-	s->f[0] = NULL;
61
+	memset (s->f, 0, sizeof(s->f));
62 62
 	while (param_idx<s->n) {
63 63
 		accept = 0;
64 64
 		switch (s->params[param_idx].type) {
... ...
@@ -145,7 +145,6 @@ int resolve_select(select_t* s)
145 145
 		if (t->table[table_idx].flags & NESTED) {
146 146
 			if (nested < MAX_NESTED_CALLS-1) { /* need space for final function */
147 147
 				s->f[nested++] = f;
148
-				s->f[nested] = NULL;
149 148
 			} else {
150 149
 				BUG("MAX_NESTED_CALLS too small to resolve select\n");
151 150
 				goto not_found;