[Poppler-bugs] [Bug 99271] make it possible to extract digital signature data (also in pdfsig)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 14 21:27:11 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=99271

--- Comment #11 from Albert Astals Cid <aacid at kde.org> ---
> Consider using a std::unique_ptr here, to make it clear that the method does
> not  retain ownership.

No std::unique_ptr for now please, we don't really use them in core yet.

>  {
> -  if (!CMSSignerInfo)
> -      return NULL;
> +  if (CMSSignerInfo == nullptr)
> +    return nullptr;
> 
> This is purely cosmetic.  Not sure if that is allowed.

Cosmetic changes are evil because make reviewing harder for no reason, one has
to carefully look at the change to see if the logic broke or not, please
refrain for any cosmetic change

> 
> +const char * SignatureHandler::getSignerSubjectDN()
> +{
> +  if (CMSSignerInfo == nullptr)
> +    return nullptr;
> +
> 
> if (!CMSSignerInfo) seems to be the prefered pattern in poppler.  The if
> (... == nullptr)
> way appears various times in this patch.  Not sure whether it is okay to
> keep it.

Yes, don't do == nullptr

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20170614/2346c3f1/attachment.html>


More information about the Poppler-bugs mailing list