Simplify loop of _in_str

This commit is contained in:
Patrick Pelissier committed 2017-08-19 21:10:26 +02:00
1 parent 44cdfa0c77
commit ebfc5615fc
1 file changed
+2 -2
+2 -2
View File
@@ -513,12 +513,12 @@ bitset_in_str(bitset_t set, FILE *file)
int c = fgetc(file);
if (c != '[') return false;
c = fgetc(file);
do {
while (c == '0' || c == '1') {
if (c != '0' && c != '1') break;
const bool b = (c == '1');
bitset_push_back (set, b);
c = fgetc(file);
} while (c != ']' && c != EOF);
}
BITSETI_CONTRACT (set);
return c == ']';
}