develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34414 - trunk/src/pmc

From:
petdance
Date:
December 26, 2008 23:50
Subject:
[svn:parrot] r34414 - trunk/src/pmc
Message ID:
20081227075008.DF99DCBA12@x12.develooper.com
Author: petdance
Date: Fri Dec 26 23:50:08 2008
New Revision: 34414

Modified:
   trunk/src/pmc/env.pmc

Log:
localizing a pointer

Modified: trunk/src/pmc/env.pmc
==============================================================================
--- trunk/src/pmc/env.pmc	(original)
+++ trunk/src/pmc/env.pmc	Fri Dec 26 23:50:08 2008
@@ -159,15 +159,14 @@
         else {
             char * const keyname = string_to_cstring(interp,
                 VTABLE_get_string(interp, key));
-            char *val            = NULL;
 
             if (keyname) {
                 int free_it = 0;
-                val         = Parrot_getenv(keyname, &free_it);
+                char * const val = Parrot_getenv(keyname, &free_it);
                 string_cstring_free(keyname);
 
                 if (val) {
-                    STRING *retval = string_from_cstring(interp, val, 0);
+                    STRING * const retval = string_from_cstring(interp, val, 0);
 
                     if (free_it)
                         mem_sys_free(val);



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About