Skip to content
  • Rémi Denis-Courmont's avatar
    block_Realloc: optimize and conformize · 23510de8
    Rémi Denis-Courmont authored
     * Shrink the buffer in either direction before reallocating,
       so we don't need to copy discarded data.
    (* Special case if the payload is entirely discarded.)
     * Avoid potentially overflowing pointer comparisons
      (In real life, it works, but it is not defined by the C specification).
    23510de8