apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r584236 - /apr/apr/branches/1.2.x/misc/win32/env.c
Date Fri, 12 Oct 2007 19:19:27 GMT
Author: wrowe
Date: Fri Oct 12 12:19:17 2007
New Revision: 584236

URL: http://svn.apache.org/viewvc?rev=584236&view=rev
Log:
zero bytes is a LEGAL length of an envvar value

(also fix a minor spelling error)

Backports: 582701

Modified:
    apr/apr/branches/1.2.x/misc/win32/env.c

Modified: apr/apr/branches/1.2.x/misc/win32/env.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/misc/win32/env.c?rev=584236&r1=584235&r2=584236&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/misc/win32/env.c (original)
+++ apr/apr/branches/1.2.x/misc/win32/env.c Fri Oct 12 12:19:17 2007
@@ -78,12 +78,9 @@
 
         wvalue = apr_palloc(pool, size * sizeof(*wvalue));
         size = GetEnvironmentVariableW(wenvvar, wvalue, size);
-        if (size == 0)
-            /* Mid-air collision?. Somebody must've changed the env. var. */
-            return APR_INCOMPLETE;
 
         inchars = wcslen(wvalue) + 1;
-        outchars = 3 * inchars; /* Enougn for any UTF-8 representation */
+        outchars = 3 * inchars; /* Enough for any UTF-8 representation */
         val = apr_palloc(pool, outchars);
         status = apr_conv_ucs2_to_utf8(wvalue, &inchars, val, &outchars);
         if (status)



Mime
View raw message