Bug 92807 - Redundant check for 'signature' is always 'true' in p11-kit-0.23.1/common/mock.c
Summary: Redundant check for 'signature' is always 'true' in p11-kit-0.23.1/common/mock.c
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-04 05:03 UTC by Pankaj
Modified: 2015-11-23 11:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
p11-kit-0.23.1-mock-001 patch (477 bytes, patch)
2015-11-04 05:03 UTC, Pankaj
Details | Splinter Review

Description Pankaj 2015-11-04 05:03:23 UTC
Created attachment 119393 [details] [review]
p11-kit-0.23.1-mock-001 patch

Hi,
it is reported as double check for 'signature' to be NULL.
the 'signature' is already checked by macro 
p11-kit-0.23.1/common/mock.c:2966 
return_val_if_fail (signature, CKR_ARGUMENTS_BAD);

that's why 'signature' will always be true in if()
p11-kit-0.23.1/common/mock.c:2980
 if (!signature || signature_len != length)

So,I thinks this check for 'signature' is not required in if()

The respective patch has been attached ,please review it.

Thanks!
Pankaj Sharma
Comment 1 Stef Walter 2015-11-23 11:57:51 UTC
Thanks merged.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.