[PATCH 32/32] [libx11] Cannot reach dead statement "return NULL; "
Erkki Seppala
erkki.seppala at vincit.fi
Fri Jan 28 04:26:53 PST 2011
On 27.01.2011 10:30, Alan Coopersmith wrote:
>> prop->name= (char *)_XkbAlloc(strlen(name)+1);
>> - if (!name)
>> - return NULL;
>> strcpy(prop->name,name);
>> prop->value= (char *)_XkbAlloc(strlen(value)+1);
>> if (!value) {
> Looks like that should instead be checking if (!prop->name) to
> make sure the alloc didn't fail. Same for the following
> if (!value) instead of if(!prop->value).
Indeed. I have a v2 patch waiting :).
More information about the xorg-devel
mailing list