apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1533111 - /apr/apr/trunk/strings/apr_cpystrn.c
Date Thu, 17 Oct 2013 15:22:48 GMT
Author: jim
Date: Thu Oct 17 15:22:47 2013
New Revision: 1533111

URL: http://svn.apache.org/r1533111
Log:
make sure d is inited

Modified:
    apr/apr/trunk/strings/apr_cpystrn.c

Modified: apr/apr/trunk/strings/apr_cpystrn.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/strings/apr_cpystrn.c?rev=1533111&r1=1533110&r2=1533111&view=diff
==============================================================================
--- apr/apr/trunk/strings/apr_cpystrn.c (original)
+++ apr/apr/trunk/strings/apr_cpystrn.c Thu Oct 17 15:22:47 2013
@@ -46,14 +46,13 @@
 APR_DECLARE(char *) apr_cpystrn(char *dst, const char *src, apr_size_t dst_size)
 {
 
-    char *d, *end;
+    char *d = dst, *end;
 
     if (dst_size == 0) {
         return (dst);
     }
 
     if (src) {
-        d = dst;
         end = dst + dst_size - 1;
 
         for (; d < end; ++d, ++src) {



Mime
View raw message