X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fmembuf%2Fmembuf.c;h=39841d9705a53843877828a45f7228eebddb1124;hp=b3b2f08ded7bd6e7f3b6d8e1906911dbf623c8d7;hb=b3cc8ae7c2fe35cf20bd0bac211658c0ecbdbdae;hpb=7d1f0c73e4d321561abb74f82c8be97f10d69836;ds=sidebyside diff --git a/ccan/membuf/membuf.c b/ccan/membuf/membuf.c index b3b2f08d..39841d97 100644 --- a/ccan/membuf/membuf.c +++ b/ccan/membuf/membuf.c @@ -23,7 +23,7 @@ size_t membuf_prepare_space_(struct membuf *mb, /* Always reset in the trivial empty case. */ if (mb->start == mb->end) mb->start = mb->end = 0; - + if (membuf_num_space_(mb) >= num_extra) return 0;