Skip to content
Snippets Groups Projects
Commit 4692ac3f authored by Clemens Paumgarten's avatar Clemens Paumgarten
Browse files

Reverted some borken stuff

parent 9af51c9a
No related branches found
No related tags found
No related merge requests found
......@@ -85,30 +85,11 @@ int mcc_tac_add_entry(struct mcc_tac *tac, struct mcc_tac_entry *te) {
int mcc_tac_create_and_add_new_entry(
enum mcc_tac_operation tac_op,
char *arg1_temp,
char *arg2_temp,
char *result_temp,
char *arg1,
char *arg2,
char *result,
struct mcc_tac *tac) {
// this way every string is stored in heap, easier to free
char *arg1 = NULL;
char *arg2 = NULL;
char *result = NULL;
if (arg1_temp != NULL) {
arg1 = malloc(sizeof(arg1_temp));
*arg1 = *arg1_temp;
}
if (arg2_temp != NULL) {
arg2 = malloc(sizeof(arg2_temp));
*arg2 = *arg2_temp;
}
if (result_temp != NULL) {
result = malloc(sizeof(result));
*result = *result;
}
struct mcc_tac_entry *te = mcc_tac_new_entry(tac_op, arg1, arg2, result);
......
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