Do not compare unsigned integer for "< 0"
authorPavan Deolasee <[email protected]>
Fri, 11 Mar 2016 06:44:07 +0000 (12:14 +0530)
committerPavan Deolasee <[email protected]>
Fri, 11 Mar 2016 06:44:07 +0000 (12:14 +0530)
src/gtm/client/fe-misc.c

index 28ba9c461233290865fd77aeb9445db798345e4d..a2597fd3e493b07c0c3d55d06ad508b5a5e4788a 100644 (file)
@@ -165,7 +165,7 @@ gtmpqPuts(const char *s, GTM_Conn *conn)
 int
 gtmpqGetnchar(char *s, size_t len, GTM_Conn *conn)
 {
-       if (len < 0 || len > (size_t) (conn->inEnd - conn->inCursor))
+       if (len > (size_t) (conn->inEnd - conn->inCursor))
                return EOF;
 
        memcpy(s, conn->inBuffer + conn->inCursor, len);