apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r577943 - /apr/apr-util/trunk/memcache/apr_memcache.c
Date Thu, 20 Sep 2007 22:02:06 GMT
Author: pquerna
Date: Thu Sep 20 15:02:06 2007
New Revision: 577943

URL: http://svn.apache.org/viewvc?rev=577943&view=rev
Log:
Only set len if length isn't null.

Modified:
    apr/apr-util/trunk/memcache/apr_memcache.c

Modified: apr/apr-util/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/memcache/apr_memcache.c?rev=577943&r1=577942&r2=577943&view=diff
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Thu Sep 20 15:02:06 2007
@@ -749,7 +749,7 @@
         char *length;
         char *start;
         char *last;
-        apr_size_t len;
+        apr_size_t len = 0;
 
         start = conn->buffer;
         flags = apr_strtok(conn->buffer," ",&last);
@@ -760,7 +760,9 @@
             *flags_ = atoi(flags);
 
         length = apr_strtok(NULL," ",&last);
-        len = atoi(length);
+        if (lenth)
+            len = atoi(length);
+
         if (len < 0)  {
             *new_length = 0;
             *baton = NULL;



Mime
View raw message