apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1534882 - in /apr/apr/trunk: memcache/apr_memcache.c strings/apr_snprintf.c util-misc/apr_queue.c xml/apr_xml.c
Date Wed, 23 Oct 2013 00:43:23 GMT
Author: trawick
Date: Wed Oct 23 00:43:22 2013
New Revision: 1534882

URL: http://svn.apache.org/r1534882
Log:
fix some minor bugs and useless assignments so that clang scan-build
is a little quieter

Modified:
    apr/apr/trunk/memcache/apr_memcache.c
    apr/apr/trunk/strings/apr_snprintf.c
    apr/apr/trunk/util-misc/apr_queue.c
    apr/apr/trunk/xml/apr_xml.c

Modified: apr/apr/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memcache/apr_memcache.c?rev=1534882&r1=1534881&r2=1534882&view=diff
==============================================================================
--- apr/apr/trunk/memcache/apr_memcache.c (original)
+++ apr/apr/trunk/memcache/apr_memcache.c Wed Oct 23 00:43:22 2013
@@ -407,6 +407,9 @@ APR_DECLARE(apr_status_t) apr_memcache_s
     apr_pool_t *np;
 
     rv = apr_pool_create(&np, p);
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
 
     server = apr_palloc(np, sizeof(apr_memcache_server_t));
 
@@ -787,8 +790,8 @@ apr_memcache_getp(apr_memcache_t *mc,
         char *last;
         apr_size_t len = 0;
 
-        flags = apr_strtok(conn->buffer, " ", &last);
-        flags = apr_strtok(NULL, " ", &last);
+        apr_strtok(conn->buffer, " ", &last);
+        apr_strtok(NULL, " ", &last);
         flags = apr_strtok(NULL, " ", &last);
 
         if (flags_) {
@@ -1359,7 +1362,7 @@ apr_memcache_multgetp(apr_memcache_t *mc
                char *data;
                apr_size_t len = 0;
 
-               key = apr_strtok(conn->buffer, " ", &last); /* just the VALUE, ignore
*/
+               apr_strtok(conn->buffer, " ", &last); /* just the VALUE, ignore */
                key = apr_strtok(NULL, " ", &last);
                flags = apr_strtok(NULL, " ", &last);
 

Modified: apr/apr/trunk/strings/apr_snprintf.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/strings/apr_snprintf.c?rev=1534882&r1=1534881&r2=1534882&view=diff
==============================================================================
--- apr/apr/trunk/strings/apr_snprintf.c (original)
+++ apr/apr/trunk/strings/apr_snprintf.c Wed Oct 23 00:43:22 2013
@@ -100,7 +100,6 @@ static char *apr_cvt(double arg, int ndi
         arg = -arg;
     }
     arg = modf(arg, &fi);
-    p1 = &buf[NDIG];
     /*
      * Do integer part
      */

Modified: apr/apr/trunk/util-misc/apr_queue.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/util-misc/apr_queue.c?rev=1534882&r1=1534881&r2=1534882&view=diff
==============================================================================
--- apr/apr/trunk/util-misc/apr_queue.c (original)
+++ apr/apr/trunk/util-misc/apr_queue.c Wed Oct 23 00:43:22 2013
@@ -223,6 +223,9 @@ APR_DECLARE(apr_status_t) apr_queue_tryp
 
     if (apr_queue_full(queue)) {
         rv = apr_thread_mutex_unlock(queue->one_big_mutex);
+        if (rv != APR_SUCCESS) {
+            return rv;
+        }
         return APR_EAGAIN;
     }
     

Modified: apr/apr/trunk/xml/apr_xml.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/xml/apr_xml.c?rev=1534882&r1=1534881&r2=1534882&view=diff
==============================================================================
--- apr/apr/trunk/xml/apr_xml.c (original)
+++ apr/apr/trunk/xml/apr_xml.c Wed Oct 23 00:43:22 2013
@@ -63,7 +63,7 @@ static int find_prefix(apr_xml_parser *p
     ** prefix.
     */
     for (; elem; elem = elem->parent) {
-        apr_xml_ns_scope *ns_scope = elem->ns_scope;
+        apr_xml_ns_scope *ns_scope;
 
         for (ns_scope = elem->ns_scope; ns_scope; ns_scope = ns_scope->next) {
             if (strcmp(prefix, ns_scope->prefix) == 0) {



Mime
View raw message