File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -852,10 +852,7 @@ bool SignTraits::DeriveBits(Environment* env,
852852 .len = params.signature .size (),
853853 };
854854 auto buf = DataPointer::Alloc (1 );
855- static_cast <char *>(buf.get ())[0 ] = 0 ;
856- if (pkctx.verify (sig_buf, data_buf)) {
857- static_cast <char *>(buf.get ())[0 ] = 1 ;
858- }
855+ *buf.get <char >() = pkctx.verify (sig_buf, data_buf);
859856 *out = ByteSource::Allocated (buf.release ());
860857 }
861858
@@ -928,10 +925,7 @@ bool SignTraits::DeriveBits(Environment* env,
928925 }
929926 } else {
930927 auto buf = DataPointer::Alloc (1 );
931- static_cast <char *>(buf.get ())[0 ] = 0 ;
932- if (context.verify (params.data , params.signature )) {
933- static_cast <char *>(buf.get ())[0 ] = 1 ;
934- }
928+ *buf.get <char >() = context.verify (params.data , params.signature );
935929 *out = ByteSource::Allocated (buf.release ());
936930 }
937931
You can’t perform that action at this time.
0 commit comments