Commit d223f7de authored by Pat Wood's avatar Pat Wood
Browse files

cosmetic change: got rid of "if (1 || ...)" tests and enclosing blocks

parent 7584b265
......@@ -153,8 +153,6 @@ void checkmbrs(int fd)
}
for(part_cnt = 0; part_cnt < mbr->PartCount && part_cnt < MAX_PART_COUNT; part_cnt++)
{
if(1 || (mbr->array[part_cnt].user_type == 2) || (mbr->array[part_cnt].user_type == 0))
{
printf("partition %2d: name = %12s, partition start = %8d, partition size = %8d\n",
part_cnt,
......@@ -162,7 +160,6 @@ void checkmbrs(int fd)
mbr->array[part_cnt].addrlo,
mbr->array[part_cnt].lenlo);
}
}
for (i = 0; i < MBR_COPY_NUM; i++) {
if (mbrs[i])
_free_mbr(mbrs[i]);
......@@ -206,13 +203,10 @@ int writembrs(int fd, char names[][MAX_NAME], __u32 *lens, unsigned int *user_ty
}
for(part_cnt = 1; part_cnt < mbr->PartCount && part_cnt < MAX_PART_COUNT; part_cnt++)
{
if(1 || (mbr->array[part_cnt].user_type == 2) || (mbr->array[part_cnt].user_type == 0))
{
fprintf(backup, "'%s %d' ", mbr->array[part_cnt].name,
mbr->array[part_cnt].lenlo);
}
}
fprintf(backup, "\n");
fclose(backup);
......@@ -234,8 +228,6 @@ int writembrs(int fd, char names[][MAX_NAME], __u32 *lens, unsigned int *user_ty
printf("\nready to write new partition tables:\n");
for(part_cnt = 0; part_cnt < mbr->PartCount && part_cnt < MAX_PART_COUNT; part_cnt++)
{
if(1 || (mbr->array[part_cnt].user_type == 2) || (mbr->array[part_cnt].user_type == 0))
{
printf("partition %2d: name = %12s, partition start = %8d, partition size = %8d\n",
part_cnt,
......@@ -243,7 +235,6 @@ int writembrs(int fd, char names[][MAX_NAME], __u32 *lens, unsigned int *user_ty
mbr->array[part_cnt].addrlo,
mbr->array[part_cnt].lenlo);
}
}
for (i = 0; i < MBR_COPY_NUM; i++) {
if (mbrs[i])
_free_mbr(mbrs[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment