lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #21075] pbuf_realloc() use with PBUF_RAM and MEM_LIBC_


From: Frédéric Bernon
Subject: [lwip-devel] [bug #21075] pbuf_realloc() use with PBUF_RAM and MEM_LIBC_MALLOC fails
Date: Fri, 14 Sep 2007 10:09:13 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Follow-up Comment #1, bug #21075 (project lwip):

mem_realloc is only used by pbuf_realloc, in this last one doc (previous
comment), we can read "@note Despite its name, pbuf_realloc cannot grow the
size of a pbuf (chain).". There is also in the pbuf_realloc code this check:

  /* desired length larger than current length? */
  if (new_len >= p->tot_len) {
    /* enlarging not yet supported */
    return;
  }

So, I think the simplest thing to do is to replace in mem.h, line 68:

#define mem_realloc(x, size) realloc(x,size)

by

#define mem_realloc(mem, size) (mem)


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?21075>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]