Why is this only executing one action then stopping the loop?
void execute_action(Action *a) {
    Action *curr = a;
    char buffer[MAXLINE];

    while (curr != NULL) {
        args_to_string(curr->args, buffer, sizeof(buffer));
        printf("%s\n", buffer);
        curr = curr->next_act;
    }

    Action *curr2 = a;

    while (curr2 != NULL) {
        execvp(curr2->args[0], curr2->args);
        curr2 = curr2->next_act;
    }
}

void evaluate_dep(char *target, Rule *rule) {
    Rule *r = find_rule(target, rule, 0);

    if (r == NULL) {
    }

    if (r != NULL) {
        Dependency *dep = r->dependencies;

        if (dep == NULL) {
            execute_action(r->actions);
        }

        while (dep != NULL) {
            evaluate_dep(dep->rule->target, rule);

            struct stat t;

            if (stat(target, &t) != 0) {
                printf("f\n");
                execute_action(r->actions);

            } else {
                int res = 2;

                res = compare_time(r->target, dep->rule->target);

                printf("%d\n", res);
                if (res == 0) {
                    execute_action(r->actions);
                }
            }

            dep = dep->next_dep;
        }
    }
}
