[PATCH:libXt 1/6] Remove unnecessary clause.

Thomas Klausner wiz at NetBSD.org
Tue Jun 25 14:02:45 PDT 2013


len is unsigned and can't be smaller than zero.
---
 src/Alloc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/Alloc.c b/src/Alloc.c
index c523d81..477dfe0 100644
--- a/src/Alloc.c
+++ b/src/Alloc.c
@@ -140,9 +140,6 @@ Cardinal XtAsprintf(
     len = vsnprintf(buf, sizeof(buf), format, ap);
     va_end(ap);
 
-    if (len < 0)
-	_XtAllocError("vsnprintf");
-
     *new_string = XtMalloc(len + 1); /* snprintf doesn't count trailing '\0' */
     if (len < sizeof(buf))
     {
-- 
1.8.3.1



More information about the xorg-devel mailing list