Skip to content

Commit

Permalink
Fix backwards memset
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Sep 4, 2016
1 parent 9adbaed commit f6a3c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/pcnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int next_rx_index(int current_rx_index) {
static void init_descriptor(int index, int is_tx) {
uint8_t * de_table = is_tx ? pcnet_tx_de_start : pcnet_rx_de_start;

memset(&de_table[index * PCNET_DE_SIZE], PCNET_DE_SIZE, 0);
memset(&de_table[index * PCNET_DE_SIZE], 0, PCNET_DE_SIZE);

uint32_t buf_addr = is_tx ? pcnet_tx_phys : pcnet_rx_phys;
*(uint32_t *)&de_table[index * PCNET_DE_SIZE] = buf_addr + index * PCNET_BUFFER_SIZE;
Expand Down

0 comments on commit f6a3c6c

Please sign in to comment.