why is this printing false twice?
while (fgets(line, MAXLINE, fp) != NULL) {
    line[MAXLINE - 1] = '\0';

    int i = MAXLINE - 1;
    while (isspace(line[i]) != 0) {
        line[i] = '\0';
        i--;
    }

    if (is_comment_or_empty(line) != 1) {
        char *token;
        token = strtok(line, " ");

        while (token != NULL) {
            if (token[0] != '\t' && (isspace(token[0]) == 0) && (strcmp(token, ":") != 0)) {
                if (head == NULL) {
                    printf("true\n");
                    r = malloc(sizeof(Rule));
                    r->target = strdup(token);
                    r->dependencies = NULL;
                    r->actions = NULL;
                    r->next_rule = NULL;
                    head = r;
                    curr = head;
                }

                if (curr->dependencies == NULL) {
                    printf("false\n");
                    dep = malloc(sizeof(Dependency));

                    if (strcmp(curr->target, token) != 0) {
                        printf("nani?\n");
                        r = malloc(sizeof(Rule));
                        r->target = strdup(token);
                        r->dependencies = NULL;
                        r->actions = NULL;
                        r->next_rule = NULL;
                        dep->next_dep = NULL;
                        dep->rule = r;
                        curr->dependencies = dep;
                        printf("%s\n", curr->dependencies->rule->target);
                        if (curr->dependencies == NULL) {
                            printf("what?\n");
                        }
                    }

                } else {
                }
            }

            token = strtok(NULL, " ");
        }
    }
}