Revision 0ae045ae hw/ne2000.c
b/hw/ne2000.c | ||
---|---|---|
224 | 224 |
{ |
225 | 225 |
NE2000State *s = opaque; |
226 | 226 |
uint8_t *p; |
227 |
int total_len, next, avail, len, index, mcast_idx; |
|
227 |
unsigned int total_len, next, avail, len, index, mcast_idx;
|
|
228 | 228 |
uint8_t buf1[60]; |
229 | 229 |
static const uint8_t broadcast_macaddr[6] = |
230 | 230 |
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |
... | ... | |
293 | 293 |
|
294 | 294 |
/* write packet data */ |
295 | 295 |
while (size > 0) { |
296 |
avail = s->stop - index; |
|
296 |
if (index <= s->stop) |
|
297 |
avail = s->stop - index; |
|
298 |
else |
|
299 |
avail = 0; |
|
297 | 300 |
len = size; |
298 | 301 |
if (len > avail) |
299 | 302 |
len = avail; |
Also available in: Unified diff