diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-25 14:10:35 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-25 14:10:35 -0600 |
commit | e814f226d6aa6c1700706bb8db9c190b8244eee5 (patch) | |
tree | 43d0dfba6c451cf16eef42251d776dc4e14cbec6 /nuttx/net/iob | |
parent | f28eff61aeb62c867249c8cb21162dbd3c60cc37 (diff) | |
download | nuttx-e814f226d6aa6c1700706bb8db9c190b8244eee5.tar.gz nuttx-e814f226d6aa6c1700706bb8db9c190b8244eee5.tar.bz2 nuttx-e814f226d6aa6c1700706bb8db9c190b8244eee5.zip |
More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs.
Diffstat (limited to 'nuttx/net/iob')
-rw-r--r-- | nuttx/net/iob/iob_trimtail.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/nuttx/net/iob/iob_trimtail.c b/nuttx/net/iob/iob_trimtail.c index c436550a8..36eebb26f 100644 --- a/nuttx/net/iob/iob_trimtail.c +++ b/nuttx/net/iob/iob_trimtail.c @@ -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; |