On 10/31/18, Marek Polacek wrote:
> On Wed, Oct 31, 2018 at 11:02:16AM -0400, Nathan Sidwell wrote:
>> [Yes, I can't count]
>>
>> Include file handling duplicated cleanup code in each exit path. Simpler
>> to
>> just commonize it with goto. Also noticed a memory leak in buffer
>> popping.
>>
>>
On Wed, Oct 31, 2018 at 12:24:44PM -0400, Nathan Sidwell wrote:
> On 10/31/18 11:44 AM, Marek Polacek wrote:
>
> > > + else if (to_free)
> > > +free ((void *)to_free);
> >
> > free (NULL) is ok so do you really need the check?
>
> Probably not :) IIRC the if (X) free (X) idiom was nearby,
On 10/31/18 11:44 AM, Marek Polacek wrote:
+ else if (to_free)
+free ((void *)to_free);
free (NULL) is ok so do you really need the check?
Probably not :) IIRC the if (X) free (X) idiom was nearby, and I didn't
feel like rocking that boat.
nathan
--
Nathan Sidwell
On Wed, Oct 31, 2018 at 11:02:16AM -0400, Nathan Sidwell wrote:
> [Yes, I can't count]
>
> Include file handling duplicated cleanup code in each exit path. Simpler to
> just commonize it with goto. Also noticed a memory leak in buffer popping.
>
> Applying to trunk.
>
> --
> Nathan Sidwell
>
[Yes, I can't count]
Include file handling duplicated cleanup code in each exit path.
Simpler to just commonize it with goto. Also noticed a memory leak in
buffer popping.
Applying to trunk.
--
Nathan Sidwell
2018-10-31 Nathan Sidwell
* directives.c (do_include_common): Commonize clea