Revision fef13fa8

b/hw/usb-desc.c
76 76
{
77 77
    uint8_t  bLength = 0x09;
78 78
    uint16_t wTotalLength = 0;
79
    int i, rc, count;
79
    int i, rc;
80 80

  
81 81
    if (len < bLength) {
82 82
        return -1;
......
91 91
    dest[0x08] = conf->bMaxPower;
92 92
    wTotalLength += bLength;
93 93

  
94
    count = conf->nif ? conf->nif : conf->bNumInterfaces;
95
    for (i = 0; i < count; i++) {
94
    for (i = 0; i < conf->nif; i++) {
96 95
        rc = usb_desc_iface(conf->ifs + i, dest + wTotalLength, len - wTotalLength);
97 96
        if (rc < 0) {
98 97
            return rc;

Also available in: Unified diff