diff --git a/src/db.c b/src/db.c index 300b1a1..c05c570 100644 --- a/src/db.c +++ b/src/db.c @@ -63,8 +63,7 @@ llist *write_csv_to_llist(const char *filename) { int count = 0; // task counter fgets(line, sizeof(line), file); // read and ignore file head - while (fgets(line, sizeof(line), file)) { - memset(line, 0, sizeof(line)); + while (fgets(line, sizeof(line), file)); count++; // remove newline sign line[strcspn(line, "\n")] = '\0';