[syslinux] [PATCH 1/2] com32/lib/: Avoid unneeded allocation.
Raphael S Carvalho
raphael.scarv at gmail.com
Tue Sep 17 07:18:07 PDT 2013
> There's trailing whitespace here.
>
>> memset(&inreg, 0, sizeof inreg);
>> inreg.eax.b[1] = 0x48;
>> inreg.edx.b[0] = disk;
>> @@ -153,7 +153,8 @@ int disk_get_params(int disk, struct disk_info *const diskinfo)
>> diskinfo->lbacnt = diskinfo->cyl * diskinfo->head * diskinfo->spt;
>>
>> out:
>> - lfree(eparam);
>> + if (eparam)
>> + lfree(eparam);
>> return rv;
>> }
>
> You actually don't need to check for 'eparam' being NULL, lfree() can
> handle being called with a NULL pointer.
I will work on these issues, and resend the patch. Also, I definitely
have to fix my text editor to avoid trailing whitespace.
Regards,
Raphael S. Carvalho.
More information about the Syslinux
mailing list