forked from github/server
fix coverity errors
This commit is contained in:
parent
07f7adbe56
commit
de06600394
2 changed files with 5 additions and 2 deletions
|
@ -1186,6 +1186,9 @@ int readgame(const char *filename)
|
|||
binstore_done(&store);
|
||||
fstream_done(&strm);
|
||||
}
|
||||
else {
|
||||
fclose(F);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
@ -1443,7 +1443,7 @@ void pump_paragraph(sbstring *sbp, stream *out, size_t maxlen, bool isfinal)
|
|||
++begin;
|
||||
}
|
||||
pos = begin;
|
||||
while (pos) {
|
||||
do {
|
||||
char *next = strchr(pos+1, ' ');
|
||||
if (next == NULL) {
|
||||
if (isfinal) {
|
||||
|
@ -1474,7 +1474,7 @@ void pump_paragraph(sbstring *sbp, stream *out, size_t maxlen, bool isfinal)
|
|||
break;
|
||||
}
|
||||
pos = next;
|
||||
}
|
||||
} while (pos);
|
||||
}
|
||||
if (isfinal) {
|
||||
char *pos = sbp->begin;
|
||||
|
|
Loading…
Reference in a new issue