diff --git a/mpiuse.c b/mpiuse.c index 6bd7b3116e0910b152e49112be86057bad80a0f6..1a2b46bb00e2ad2ab230c88690910bf76ea5562f 100644 --- a/mpiuse.c +++ b/mpiuse.c @@ -155,7 +155,7 @@ void mpiuse_log_restore(const char *filename) { while (!feof(fd)) { if (fgets(line, 132, fd) != NULL) { - if (line[0] != '#') { + if (line[0] != '#' && line[0] != '\n') { sscanf(line, "%zd %zd %zd %d %d %d %s %d %s %d %d %d %zd %zd", &stic, &etic, &dtic, &step, &rank, &otherrank, type, &itype, subtype, &isubtype, &activation, &tag, &size, &sum); @@ -254,6 +254,6 @@ int mpiuse_nr_ranks(void) { return mpiuse_max_rank + 1; } */ struct mpiuse_log_entry *mpiuse_get_log(int ind) { - if (ind < mpiuse_log_count && ind >= 0) return &mpiuse_log[ind]; + if (ind < (int)mpiuse_log_count && ind >= 0) return &mpiuse_log[ind]; return NULL; }