You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/10/12 21:27:10 UTC

svn commit: r584240 - /apr/apr/branches/0.9.x/misc/win32/env.c

Author: wrowe
Date: Fri Oct 12 12:27:09 2007
New Revision: 584240

URL: http://svn.apache.org/viewvc?rev=584240&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/0.9.x/misc/win32/env.c

Modified: apr/apr/branches/0.9.x/misc/win32/env.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/misc/win32/env.c?rev=584240&r1=584239&r2=584240&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/misc/win32/env.c (original)
+++ apr/apr/branches/0.9.x/misc/win32/env.c Fri Oct 12 12:27:09 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)