mark.sheppard at oracle.com
Fri Mar 22 12:52:33 UTC 2013
in the cleanup, would it be necessary to free the allocated pathv
array also, prior to return?
if I'm not misreading.
Also, rather than storing the pointer to the string literal, malloc
(NEW) and memcpy as per the other entries.
This will avoid potential conflict should other code attempt to release
the pathv, which would be unaware
of it containing the string literal. (Who cleans up pathv after it has
On 21/03/2013 18:36, John Zavgren wrote:
> How does this look?
> 1.) I reverted the for statement formatting change.
> 2.) I removed the goto statement and "inlined" some code instead.
> 3.) I checked to make sure that we're not freeing memory that we didn't actually allocate. (Path vector elements that are empty.)
> ----- Original Message -----
> From: christos at zoulas.com
> To: martinrb at google.com, john.zavgren at oracle.com
> Cc: core-libs-dev at openjdk.java.net
> Sent: Thursday, March 21, 2013 2:00:10 PM GMT -05:00 US/Canada Eastern
> Subject: Re: RFR-8008118
> On Mar 21, 10:10am, martinrb at google.com (Martin Buchholz) wrote:
> -- Subject: Re: RFR-8008118
> | Please revert this formatting change:
> | - for (q = p; (*q != ':') && (*q != '\0'); q++)
> | - ;
> | + for (q = p; (*q != ':') && (*q != '\0'); q++);
> | +
> Stylistically I prefer:
> for (q = p; (*q != ':') && (*q != '\0'); q++)
> so that re-formatting accidents don't happen, and the intent is clearly
More information about the core-libs-dev