less has a peculiar estrdup function. unlike ecalloc etc., it only prints an
error but doesn't quit. But the callers don't seem to check for null. And in
many places they call a function called save() instead.
It is clearer to make estrdup() quit and use it everywhere.
Index: cmdbuf.c
>On Sat, Nov 07, 2015 at 12:12:55AM -0500, Michael McConville wrote:
>> Ted Unangst wrote:
>> > less has a peculiar estrdup function. unlike ecalloc etc., it only
>> > prints an error but doesn't quit. But the callers don't seem to check
>> > for null. And in many places they call a function
Hmm I thought this was deliberate but looking at where estrdup is used
it is obviously not. ok nicm
On Fri, Nov 06, 2015 at 11:07:26PM -0500, Ted Unangst wrote:
> less has a peculiar estrdup function. unlike ecalloc etc., it only prints an
> error but doesn't quit. But the callers don't seem
On Sat, Nov 07, 2015 at 12:12:55AM -0500, Michael McConville wrote:
> Ted Unangst wrote:
> > less has a peculiar estrdup function. unlike ecalloc etc., it only
> > prints an error but doesn't quit. But the callers don't seem to check
> > for null. And in many places they call a function called
Ted Unangst wrote:
> less has a peculiar estrdup function. unlike ecalloc etc., it only
> prints an error but doesn't quit. But the callers don't seem to check
> for null. And in many places they call a function called save()
> instead.
>
> It is clearer to make estrdup() quit and use it