Commit c8676d939e for openssl.org
commit c8676d939e76acfb80e01743ffa73957b026ec1c
Author: Bob Beck <beck@obtuse.com>
Date: Mon May 4 17:59:18 2026 -0600
Update crypto/objects/obj_dat.pl
Co-authored-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Thu May 7 15:41:15 2026
(Merged from https://github.com/openssl/openssl/pull/31046)
diff --git a/crypto/objects/obj_dat.pl b/crypto/objects/obj_dat.pl
index a2bba8b0fa..54c42cdbeb 100644
--- a/crypto/objects/obj_dat.pl
+++ b/crypto/objects/obj_dat.pl
@@ -219,8 +219,8 @@ printf "static const unsigned int obj_objs[NUM_OBJ] = {\n";
# Compare DER; prefer shorter; if some length, use the "smaller" encoding.
sub obj_cmp
{
- my $A = defined($obj_len{$obj{$nid{$a}}}) ? $obj_len{$obj{$nid{$a}}} : 0;
- my $B = defined($obj_len{$obj{$nid{$b}}}) ? $obj_len{$obj{$nid{$b}}} : 0;
+ my $A = $obj_len{$obj{$nid{$a}}} // 0;
+ my $B = $obj_len{$obj{$nid{$b}}} // 0;
my $r = $A - $B;
return $r if $r != 0;
return 0 if $A == 0;