Skip to content
Snippets Groups Projects
Commit 384bd6c2 authored by w328li's avatar w328li
Browse files

remove redundant NULL

parent 60c8ef60
No related branches found
No related tags found
No related merge requests found
......@@ -1702,7 +1702,7 @@ yyreduce:
printf("BasicPred 1\n");
cons_cell* first_term = create_term((yyvsp[-2]));
cons_cell* second_term = create_term((yyvsp[0]));
(yyval) = create_comp_operator((yyvsp[-1]), first_term, second_term, NULL);
(yyval) = create_comp_operator((yyvsp[-1]), first_term, second_term);
}
#line 1708 "SQLPGrammar_new.tab.c" /* yacc.c:1646 */
break;
......
......@@ -261,7 +261,7 @@ BasicPred
printf("BasicPred 1\n");
cons_cell* first_term = create_term($1);
cons_cell* second_term = create_term($3);
$$ = create_comp_operator($2, first_term, second_term, NULL);
$$ = create_comp_operator($2, first_term, second_term);
}
| EXIST '(' Body ')'
{
......
No preview for this file type
......@@ -84,10 +84,9 @@ cons_cell* create_op(char *op) {
}
// todo: why need ra
cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2, cons_cell* ra) {
cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2) {
cons_cell* ra_cons = create_cons_cell(ra, NULL);
cons_cell* term2_cons = create_cons_cell(term2, ra_cons);
cons_cell* term2_cons = create_cons_cell(term2, NULL);
cons_cell* term1_cons = create_cons_cell(term1, term2_cons);
cons_cell* op_cons = create_cons_cell(op, term1_cons);
char operator[5] = "COMP\0";
......
......@@ -69,7 +69,7 @@ cons_cell* create_col(char *col);
cons_cell* create_attr(char *attr);
cons_cell* create_var(char *var);
cons_cell* create_op(char *op);
cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2, cons_cell* ra);
cons_cell* create_comp_operator(cons_cell* op, cons_cell* term1, cons_cell* term2);
cons_cell* create_atom_operator(cons_cell* table, cons_cell* var);
cons_cell* create_union_all_operator(cons_cell* ra1, cons_cell* ra2);
cons_cell* create_union_operator(cons_cell* ra1, cons_cell* ra2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment