]> git.kaiwu.me - njs.git/commitdiff
Allowing to reserve 0 bytes in njs_chb_reserve() for consistency.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 11 Jan 2021 19:53:09 +0000 (19:53 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 11 Jan 2021 19:53:09 +0000 (19:53 +0000)
src/njs_chb.c

index 718cfe6d0c7a9fefbf4ae21e748860cc78496322..6c54ec8f3ae9d5cad14b524e221b4a52f41233b5 100644 (file)
@@ -34,10 +34,6 @@ njs_chb_reserve(njs_chb_t *chain, size_t size)
 {
     njs_chb_node_t  *n;
 
-    if (njs_slow_path(size == 0)) {
-        return NULL;
-    }
-
     n = chain->last;
 
     if (njs_fast_path(n != NULL && njs_chb_node_room(n) >= size)) {