else
first = read_int(scround(start), scround(stop)+1,
scround(stop), 0, mesg);
- if (display_in_cyl_units)
+ if (display_in_cyl_units) {
first *= units_per_sector;
- else
+ } else {
/* Starting sector has to be properly aligned */
- first = (first + g_heads * g_sectors - 1) / (g_heads * g_sectors);
+ first = (first + g_heads * g_sectors - 1) /
+ (g_heads * g_sectors);
+ first *= g_heads * g_sectors;
+ }
if (n == 2 && first != 0)
printf("\
It is highly recommended that the third partition covers the whole disk\n\
"there may destroy your partition table and bootblock.\n"
"Type YES if you're very sure you would like that partition\n"
"tagged with 82 (Linux swap): ");
- if (strcmp (line_ptr, "YES\n"))
+ if (strcmp(line_ptr, "YES") != 0)
return;
}
switch (sys) {