Date: Thu, 5 May 2011 17:28:45 +0000 (UTC) From: Jack F Vogel <jfv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221505 - head/sys/dev/e1000 Message-ID: <201105051728.p45HSjRN009113@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jfv Date: Thu May 5 17:28:45 2011 New Revision: 221505 URL: http://svn.freebsd.org/changeset/base/221505 Log: Add an initialization to the error variable, without this there is a rare return path that bogusly appears to fail when it should not. Also white space correction. Thanks to Arnaud Lacombe for noticing the problem. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu May 5 17:11:26 2011 (r221504) +++ head/sys/dev/e1000/if_em.c Thu May 5 17:28:45 2011 (r221505) @@ -3901,7 +3901,7 @@ em_setup_receive_ring(struct rx_ring *rx struct adapter *adapter = rxr->adapter; struct em_buffer *rxbuf; bus_dma_segment_t seg[1]; - int i, j, nsegs, error; + int i, j, nsegs, error = 0; /* Clear the ring contents */ @@ -3919,7 +3919,7 @@ em_setup_receive_ring(struct rx_ring *rx if (++j == adapter->num_rx_desc) j = 0; - while(j != rxr->next_to_check) { + while (j != rxr->next_to_check) { rxbuf = &rxr->rx_buffers[i]; rxbuf->m_head = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105051728.p45HSjRN009113>