Revision d2c5efd8 hw/hpet.c

b/hw/hpet.c
74 74
    uint8_t  hpet_id;           /* instance id */
75 75
} HPETState;
76 76

  
77
struct hpet_fw_config hpet_cfg = {.count = ~0};
77
struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
78 78

  
79 79
static uint32_t hpet_in_legacy_mode(HPETState *s)
80 80
{
......
682 682
    int i, iomemtype;
683 683
    HPETTimer *timer;
684 684

  
685
    if (hpet_cfg.count == ~0) /* first instance */
685
    if (hpet_cfg.count == UINT8_MAX) {
686
        /* first instance */
686 687
        hpet_cfg.count = 0;
688
    }
687 689

  
688 690
    if (hpet_cfg.count == 8) {
689 691
        fprintf(stderr, "Only 8 instances of HPET is allowed\n");

Also available in: Unified diff