[Rpm-maint] [PATCH] Moved code to check possibility of freshen operation to checkFreshenStatus.

Panu Matilainen pmatilai at redhat.com
Thu Apr 23 09:34:22 UTC 2009


On Sat, 14 Mar 2009, Rakesh Pandit wrote:

> 2009/3/13 Panu Matilainen wrote:
>> On Wed, 11 Mar 2009, Rakesh Pandit wrote:
> [..]
>
>> Looks fine to me, just an enhancement suggestion while you're at this...
>> the "xx" is completely useless again as headerNVR() only ever returns with
>> 0, BUT checking for name != NULL would actually be appropriate:
>>
>> headerNVR() failing here is pretty much a "cant happen" case, but if it
>> somehow returned NULL in name, the following rpmtsInitIterator() would match
>> every single package in the db and the checking would do completely bogus
>> comparisons with unwanted results.
>>
>>        - Panu -
>>
>
> Thanks.
>
> Updated: http://rakesh.fedorapeople.org/rpm/0002--Moved-code-to-check-possibility-of-freshen-operati.patch
>
> Initialized mi = NULL and added a check for name!=NULL will now handle
> this case.

Thanks, applied with a slight modification: also initialize name to NULL. 
headerNVR() as it's currently implemented does always set it to NULL but 
that's a kind of a side-effect, I find it clearer to explicitly 
initialize.

 	- Panu -


More information about the Rpm-maint mailing list