Thrift: Forgot to dereference a pointer.
authorDavid Reiss <dreiss@apache.org>
Mon, 4 Feb 2008 19:24:00 +0000 (19:24 +0000)
committerDavid Reiss <dreiss@apache.org>
Mon, 4 Feb 2008 19:24:00 +0000 (19:24 +0000)
Summary:
This didn't get updated when the interface changed,
and the cast silenced the warning message.  Stupid C.

Reviewed By: mcslee

Test Plan: Trust Chad Walters.

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665457 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/transport/TZlibTransport.cpp

index ea0b0a4..27aa350 100644 (file)
@@ -238,7 +238,7 @@ const uint8_t* TZlibTransport::borrow(uint8_t* buf, uint32_t* len) {
   // Don't try to be clever with shifting buffers.
   // If we have enough data, give a pointer to it,
   // otherwise let the protcol use its slow path.
-  if (readAvail() >= (int)len) {
+  if (readAvail() >= (int)*len) {
     *len = (uint32_t)readAvail();
     return urbuf_ + urpos_;
   }