More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs.

This commit is contained in:
Gregory Nutt
2014-11-25 14:10:35 -06:00
parent 9ac09db800
commit 1aa528a572
9 changed files with 9 additions and 14 deletions
-6
View File
@@ -86,7 +86,6 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen)
FAR struct iob_s *entry;
FAR struct iob_s *penultimate;
FAR struct iob_s *last;
unsigned int iosize;
int len;
nlldbg("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen);
@@ -105,14 +104,9 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen)
penultimate = NULL;
last = NULL;
iosize = 0;
for (entry = iob; entry; entry = entry->io_flink)
{
/* Accumulate the total size of all buffers in the list */
iosize += entry->io_len;
/* Remember the last and the next to the last in the chain */
penultimate = last;
-1
View File
@@ -163,7 +163,6 @@ void netdev_router(FAR struct net_driver_s *dev, net_ipaddr_t target,
#else
net_ipaddr_copy(*router, match.target);
#endif
ret = OK;
}
else
{