From acdcd7790704b312655f9b11b082a3ee61e4edc7 Mon Sep 17 00:00:00 2001
From: Dmitry Simonenko <pmwkaa@gmail.com>
Date: Sat, 12 Jan 2013 01:27:34 +0400
Subject: [PATCH] connector-c-lite: inverting return value for overbound
 buffer.

---
 connector/c/include/tp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/connector/c/include/tp.h b/connector/c/include/tp.h
index e5a3490e11..934c9a6857 100644
--- a/connector/c/include/tp.h
+++ b/connector/c/include/tp.h
@@ -494,7 +494,7 @@ tp_reqbuf(char *buf, size_t size) {
 	register int sz =
 		((struct tp_h*)buf)->len + sizeof(struct tp_h);
 	return (tp_likely(size < sz)) ?
-	                  sz - size : size - sz;
+	                  sz - size : -(size - sz);
 }
 
 static inline ssize_t
-- 
GitLab