swid-inventory: Remove unused variable end_of_tag

This commit is contained in:
Tobias Brunner
2014-10-14 17:11:41 +02:00
parent f8dc376c77
commit 6de42cd323
+2 -6
View File
@@ -60,28 +60,25 @@ static status_t read_swid_tags(private_swid_inventory_t *this, FILE *file)
swid_tag_t *tag; swid_tag_t *tag;
bio_writer_t *writer; bio_writer_t *writer;
chunk_t tag_encoding, tag_file_path = chunk_empty; chunk_t tag_encoding, tag_file_path = chunk_empty;
bool more_tags = TRUE, last_newline, end_of_tag; bool more_tags = TRUE, last_newline;
char line[8192]; char line[8192];
size_t len; size_t len;
while (more_tags) while (more_tags)
{ {
last_newline = TRUE; last_newline = TRUE;
end_of_tag = FALSE;
writer = bio_writer_create(512); writer = bio_writer_create(512);
do while (TRUE)
{ {
if (!fgets(line, sizeof(line), file)) if (!fgets(line, sizeof(line), file))
{ {
more_tags = FALSE; more_tags = FALSE;
end_of_tag = TRUE;
break; break;
} }
len = strlen(line); len = strlen(line);
if (last_newline && line[0] == '\n') if (last_newline && line[0] == '\n')
{ {
end_of_tag = TRUE;
break; break;
} }
else else
@@ -90,7 +87,6 @@ static status_t read_swid_tags(private_swid_inventory_t *this, FILE *file)
writer->write_data(writer, chunk_create(line, len)); writer->write_data(writer, chunk_create(line, len));
} }
} }
while (!end_of_tag);
tag_encoding = writer->get_buf(writer); tag_encoding = writer->get_buf(writer);