static int cmp_ebr_offsets(const void *a, const void *b)
{
- struct pte *ae = (struct pte *) a,
- *be = (struct pte *) b;
+ const struct pte *ae = (const struct pte *) a,
+ *be = (const struct pte *) b;
if (ae->offset == 0 && be->offset == 0)
return 0;
static int gpt_entry_cmp_start(const void *a, const void *b)
{
- struct gpt_entry *ae = (struct gpt_entry *) a,
- *be = (struct gpt_entry *) b;
+ const struct gpt_entry *ae = (const struct gpt_entry *) a,
+ *be = (const struct gpt_entry *) b;
int au = gpt_entry_is_used(ae),
bu = gpt_entry_is_used(be);
* Sort according to start sectors and prefer the largest partition:
* entry zero is the entire-disk entry.
*/
- unsigned int i = *(int *) x;
- unsigned int j = *(int *) y;
+ const unsigned int i = *(const int *) x;
+ const unsigned int j = *(const int *) y;
unsigned int a = sgi_get_start_sector(cxt, i);
unsigned int b = sgi_get_start_sector(cxt, j);
unsigned int c = sgi_get_num_sectors(cxt, i);