[patch iwhd 4/5] make directories that we need in export domain

Jim Meyering jim at meyering.net
Thu Apr 7 06:58:13 UTC 2011


Pete Zaitcev wrote:

> On Wed, 06 Apr 2011 14:23:51 +0200
> Jim Meyering <jim at meyering.net> wrote:
>
>> > +	path = strdup(filename);
>> > +	if (!path)
>> > +		return;
>>
>> Please save a line and combine the declaration and this initialization:
>>
>>    	char *path = strdup(filename);
>
> Jim, I'm not ok with that. The check belongs with the call.
> I only initializations that can't fail.

I later suggested to use xstrdrup, since the function
should not return upon failure.

This cannot fail:

      	char *path = xstrdup(filename);


More information about the iwhd-devel mailing list