[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getprogname() for IBM z/OS
From: |
Jim Meyering |
Subject: |
Re: getprogname() for IBM z/OS |
Date: |
Fri, 14 Oct 2016 14:14:24 -0700 |
On Thu, Oct 13, 2016 at 1:10 PM, Jim Meyering <address@hidden> wrote:
> On Thu, Oct 13, 2016 at 1:50 AM, Pádraig Brady <address@hidden> wrote:
>> On 13/10/16 02:43, Daniel Richard G. wrote:
>>> On Wed, 2016 Oct 12 11:04+0100, Pádraig Brady wrote:
>>>>
>>>> You only want to strdup once.
>>>> So you could use a static to track that as is done in the AIX case.
>>>
>>> Ah, I see, the program name never changes.
>>>
>>>> You can call free(NULL), so the last 3 ifs are redundant.
>>>
>>> Revised patch is tested and attached.
>>
>> Pushed at:
>> http://git.svh.gnu.org/gitweb/?p=gnulib.git;a=commit;h=d75cbb3
>
> Thanks.
> This will be pulled into grep soon.
I've pushed this additional fix:
gnulib-getprogname-IBM-z-OS--avoid-NULL-dereference.diff
Description: Text document